I'm using this code to animate the buttons on the contact page of a website I'm designing.
//Contact Buttons
//Email
ContactPage.Email.addEventListener(MouseEvent.MOUSE_OVER,bounceEmailover);
function bounceEmailover(event:MouseEvent):void
{
var scaleTween:Tween=new Tween(event.target,"scaleX",Elastic.easeOut,1,1.5,1,true);
var scale2Tween:Tween=new Tween(event.target,"scaleY",Elastic.easeOut,1,1.5,1,true);
}
ContactPage.Email.addEventListener(MouseEvent.MOUSE_OUT,bounceEmailout);
function bounceEmailout(event:MouseEvent):void
{
var scaleTween:Tween=new Tween(event.target,"scaleX",Elastic.easeOut,1.5,1,1,true);
var scale2Tween:Tween=new Tween(event.target,"scaleY",Elastic.easeOut,1.5,1,1,true);
}
There are 4 buttons with the same code lined up across the page that I want to bounce out and overlap when I mouse over. Is there a way to bring the button I've moused over to the front instead of staying behind the button next to it?
Here's an image of the buttons. The Wordpress button has been moused over but it stays behind the Facebook button.