bring button (and pop up) to front on roll over
i using button symbols create pop ups on rollover (by sticking pop box in rollover state)
however need way bring buttons front when rollover them because pop overlap other buttons.
irealise question has been asked before i’m new as3 , i’m having difficulty adapting answers code.
i appreciate help
ben
var buttons:array = [btn1,btn2];
function movefront(event:mouseevent):void {
// move front code
}
for(var i:uint = 0; i<buttons.length; i++) {
buttons[i].addeventlistener(mouseevent.roll_over, movefront);
}
:
var buttons:array = [btn1,btn2];
function movefront(event:mouseevent):void {
event.currenttarget.parent.addchild(event.currenttarget);
}
for(var i:uint = 0; i<buttons.length; i++) {
buttons[i].addeventlistener(mouseevent.roll_over, movefront);
}
More discussions in ActionScript 3
adobe
Comments
Post a Comment