Join Login


Create a Social Network!
 actionscript3, bring button to front
 by seraphan1 - Jan 29, 2012

HI Everyone,

Any help you can provide would be greatly appreciated.

I have a number of button sitting side by side next to each other. I would like to have each button increase in size when I roll over them, but because of depth order, some of the buttons are showing behind other buttons. I tried to use the following, but wasnt successful. Any help would be awesome! I'm just a beginning student of flash.


bikeBtn2.addEventListener(MouseEvent.rollOver,popOut);

function popOut(event:MouseEvent):void{
bikeBtn2.parent.setChildIndex(bikeBtn2,bikeBtn2.numChildren–1);

}


seraphan1
United States
Posts:2
Joined:Jan 29, 2012
 RE: actionscript3, bring button to front
 by RiverCityGraphix - Feb 13, 2012

you may be able to use similar code to get it to work but I would just turn off the other buttons on rollover. For example, you roll over button1. When this happens set the visibility of button2, button3, etc to false. That might be a quick fix for you.


Be sure to subscribe on YouTube.

Do you take great photos? Consider selling them on Dreamstime.
RiverCityGraphix
United States
Posts:327
Joined:Nov 21, 2009
  
Home About Contact Forum Youtube Privacy Policy
Copyright © 2009-2011 RiverCityGraphix.All Rights Reserved.