Bring_forward

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.

thanx 4 any help.

swift.:panda:

look up “swap depth”

Thanx 4 reply,

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);
}

// Addpropery
Object.prototype.addProperty("_Depth", getDepth,this.setDepth);

// Set

logo._Depth = 50;
printy._Depth = 40;
paint._Depth = 30;
design._Depth = 20;
photo._Depth = 10;

// Get

trace(logo._Depth);
trace(printy._Depth);
trace(paint._Depth);
trace(design._Depth);
trace(photo._Depth);

I just need some code for the button, to make it swapDepths on rollover and rolloff.

Thanx in advance for any help.

swift.

:flower: :flower: :flower: :flower: :skull:

You making it very complicated.
myButt.swapDepths(20);
myButt.onRollOver = function(){
myPath.myGraphic.swapDepths(200);
}
myButt.onRollOut = function(){
myPath.myGraphic.swapDepths(19);
}

SHO