PDA

View Full Version : Problem with button-depth!


jeanmarc
08-20-2006, 07:14 PM
Hi!
I'm trying to make some coloured buttons (movieclips rather) in flash 8, but when i roll over the buttons the different depths of the buttons make it look weird because some buttons are "behind" others. I attached a zipfile with the .fla and .swf in this thread.. i'd really appreciate help with this, and would like to get the buttons to enlarge "over" all others when mouse is rolled over each button. You'll understand better if you look at my .fla... maybe this can be achieved in AS 2.0 but i dont know...

Thank you in advance...

Flash Gordon
08-20-2006, 08:26 PM
without doing it for you, all you need is
MovieClip.swapDepths( scope.getNextHighestDepth() );

when the clip is rolled off, return it to the orginal depth the same way basically.

jeanmarc
08-20-2006, 08:52 PM
Thanks alot, but do you think you could do an example .fla to show me because i dont seem to get it right :S

Sorry to bother you but it would be very appreciated.

Flash Gordon
08-20-2006, 09:31 PM
show me yours and I'll show you mine :D

You try first and post what you did.

jeanmarc
08-20-2006, 09:39 PM
well i just put the code in the roll on function.. i should say im not very used to working with AS so i havent worked with depth in AS at all almost..

Flash Gordon
08-21-2006, 03:42 AM
just add 1 line:

var scope:MovieClip = this; // you have to define scope ;)
function over():Void {
this.gotoAndPlay(2);
this.swapDepths( scope.getNextHighestDepth() );
}

function out():Void {
this.gotoAndPlay(8);
}

jeanmarc
08-21-2006, 02:23 PM
Thanks a million, its working now!

Flash Gordon
08-21-2006, 02:50 PM
:)