Putting a layer behind another layer

4 posts

Flag Post

Edit: I named this thread wrong. I mean layer, not frame. Silly me. :P

Edit 2: Fixed. Whee

So I have an object with actionscript that for some reason is above everything else on the screen, even though the layer isn’t at the top. So, I thought I’d try this before I spend a long time messing with code,

Is there a code I could put on an object or layer that puts in behind everything else on the screen, or alternatively, a code that brings something to the front?

I hope I explained that good enough. Thanks in advance. :D

 
Flag Post

Things that you attach with ActionScript will automatically be “above” the things that are put on the stage in the IDE.

Only by attaching objects using AS, can you control their depths in the same scope.

For example, you could put two MovieClips on the stage, and name them mc1 and mc2. Make sure mc2 is on top of mc1. Okay, now attach a MovieClip from the library onto mc1, and position it so it’s around where mc2 overlaps. You’ll see mc2 is still in front.

That’s one workaround for controlling the depth, i.e. using container clips

 
Flag Post

You can also use mc.swapDepths(n);
Where n is a depth number, or the name of another MovieClip to swap with.

 
Flag Post

Great, I’ll try some of this stuff out. Thanks guys.