Quick question on bringing forward elements using actionscript,
basically I have 5 buttons and on the rollover state they have a large graphic that overlaps, the problem is once placed on the stage, because the buttons are so close together the graphic disappears behind other buttons.
Is there a bit of script that will tell a button on the stage to come to the front when a user roll’s over it.
I’ve been checking out the swap depth info but its all for movieClips as apposed to buttons, I thing you can define a movieClip prototype to tell a button to act as a movieClip and swapDepths that way.
What I have got so far is
// Get Function function getDepth() { return this.getDepth(); }
// Set Function
Button.prototype.swapDepths =MovieClip.prototype.swapDepths;
function setDepth(nr) {
swapDepths.call(this, nr);
}
You making it very complicated.
myButt.swapDepths(20);
myButt.onRollOver = function(){
myPath.myGraphic.swapDepths(200);
}
myButt.onRollOut = function(){
myPath.myGraphic.swapDepths(19);
}