Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : HELP! Having trouble with Clip Events


R_Anthony
5/17/2004 10:40:53 PM
I desperatly need some help!! I can't get the onClipEvent handler to work? Even
the basic function doesn't seem to work right. With a couple of Clips on the
stage and the following code assigned to a signal clip I get the same response
no matter if I click on the movieClip on on anything else, it's not localized
to the Clip itself. In additin I've tryed to trouble shoot the problem by
creating simple statements (gotoAndStop()) for an onClip Event but I get no
responce.
Can anyone tell me what I'm doing wrong????? I'm desperate and am up against a
deadline.
onClipEvent(mouseUp){
trace(this,_name);
}
webtexr.com.au
5/17/2004 11:21:58 PM
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
5/18/2004 2:07:47 AM
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,
AddThis Social Bookmark Button