HELP! Having trouble with Clip Events  
Author Message
webtexr.com.au





PostPosted: 2004-5-18 7:21:58 Top

flash-actionscript, HELP! Having trouble with Clip Events Have you tried doing it this way?

my_mc.onMouseUp = function() {
trace("Clip Name: " + this._name);
}

Replace my_mc with whatever the instance name of your clip is. Also you have a
comma instead of a period in the trace statement (this._name) so that may have
something to do with it. Slow down. Take deep breaths.

 
mandingo





PostPosted: 2004-5-18 10:07:00 Top

flash-actionscript >> HELP! Having trouble with Clip Events be careful when you try to use events like mouseUp etc... these are a 'global'
mouse listener event and are not relative to any specific movieClip. All
movieClips will respond to these because quite simply, the mouse button is up
and they have actions to perform for this.

if what you want is to make a specific action when you release the mouse after
clicking on a certain movieClip... then try:

myMovieClip.onRelease = function(){
trace("You just clicked and released on " + this._name);
// whatever you need to happen
}

hope that helps... oh and if this is a button:

on(release){
trace("You just clicked a button on " + this._name);
// and again whatever you want
}

cheers,