This content has been marked as final. Show 6 replies
The second number is not the layer but rather the depth and yes those two are different. All stage elements have a negative depth meaning they are always on the bottom. Dynamically created clips have a positive depth. You can use swapDepth to move things around but as I myself have never used it, I don't know if it applies only to dynamic clips or to any and all clips on the stage.
I'm going to give this a go now, thanks for your suggestion.
Thanks for the suggestion but i cant get this to work. I'm using this code
They're on different layers and different time lines, now, I'm not sure why that would make a difference, but does it?
I've tried putting this code in main layer in the onEnterFrame function, in the button layer on the specifc button, in the movieclip loader Actionscript class file and none of them are doing a thing.
I've run trace statements and the button seems to be at depth -16383 and the movieclip at depth 2 (which makes sense as that's where i specify it to be when i load it)......any suggestions? where am i going wrong?
that code shouldn't be in an onEnterFrame function. the onEnterFrame function does NOT execute once when the playhead enters the frame (though from its name you might think that's what it does).
it executes repeatedly fps times per second where fps is your _level0 swf's frames per second. so, you're repeatedly swapping depths between those two. ie, several times per second the button is above then below the movieclip.
to remedy, remove that swapDepths() code from the onEnterFrame function and attach it directly to the frame where you want to position the button closer to the screen surface.
cheers foe the reply kglad. Ok i completely uinderstand why putting it onEnterFrame doenst work but i dont understand why putting it on the buttons or in the movie clip loader actionscript class. I can put it the code on a specific frame as it can happen on any frame. Maybe if you go take a look at the site where it's running and you can see what i mean.
It's really bugging me that i cant get this done