bherold
January 3rd, 2010, 10:57 AM
Hello,
I'm currently programming a portfolio webpage and made a simple picture menu with a rollover animation. I've put in the following code, but the button keeps flickering on mouse over as soon as the mouse cursor touches the frame of the animation and not the actual mc.
branding_btn.addEventListener(MouseEvent.MOUSE_OVE R, over);
branding_btn.addEventListener(MouseEvent.MOUSE_OUT , out);
function over(event:MouseEvent):void { name
switch (event.currentTarget.name)
{
case "branding_btn" :
branding_btn.gotoAndPlay(2);
break;
}
}
function out(event:MouseEvent):void { name
switch (event.currentTarget.name)
{
case "branding_btn" :
branding_btn.gotoAndStop(1);
break;
}
}
I've attached an example file, so you can have a look for yourself, and you can see the button here (http://heroldbianca.co.uk/2009/buttonbug.swf) too. Thank you very much for every help in advance.
Bianca
I'm currently programming a portfolio webpage and made a simple picture menu with a rollover animation. I've put in the following code, but the button keeps flickering on mouse over as soon as the mouse cursor touches the frame of the animation and not the actual mc.
branding_btn.addEventListener(MouseEvent.MOUSE_OVE R, over);
branding_btn.addEventListener(MouseEvent.MOUSE_OUT , out);
function over(event:MouseEvent):void { name
switch (event.currentTarget.name)
{
case "branding_btn" :
branding_btn.gotoAndPlay(2);
break;
}
}
function out(event:MouseEvent):void { name
switch (event.currentTarget.name)
{
case "branding_btn" :
branding_btn.gotoAndStop(1);
break;
}
}
I've attached an example file, so you can have a look for yourself, and you can see the button here (http://heroldbianca.co.uk/2009/buttonbug.swf) too. Thank you very much for every help in advance.
Bianca