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

flash actionscript : How to make onMouseUp event affect only one movie


gladden
5/13/2004 8:25:04 PM
Hello,

I have three movie clips that act like buttons. All three are inside another
movie clip which is loaded using attachMovie. I want each movie clip when
clicked link to a different page. The problem is when I click on one button
all buttons respond and execute the code in their listener function. I tried
two different ways of defining the listener functions but the results were the
same. In both cases all movie clips responded to a single click on only one
of them.

Could anyone please suggest what may be the problem and how to fix it? I
searched different message boards for this problem, seems no one else has this
problem. The following is my code for defining the listener functions which is
pretty standard.
Thank you in advance.

onClipEvent(mouseUp)
{
getURL("flash.html", "_self");
}

button_instance.onMouseUp = function()
{
getURL("flash.html", "_self");
}
gladden
5/13/2004 9:14:46 PM
mandingo
5/13/2004 11:54:22 PM
Yeah, onMouseUp is a global mouse function not a button behaviour.

button_instance.onRelease = function(){
// is what you needed
}

:)
AddThis Social Bookmark Button