PDA

View Full Version : Level Order



Sam
September 13th, 2003, 03:20 PM
Is it possible to change level order?

I have a parent movie with 4 other movies that load in and I would like to be able to switch their level orders, for example, switch level 5 with 1.

I appreciate any help!

Voetsjoeba
September 13th, 2003, 03:32 PM
I don't know about levels, but you can swap depths of movieclips using movieclip.swapDepths(target) or movieclip.swapDepths(depth), which pretty much does what you want :)

Sam
September 15th, 2003, 12:25 AM
Voetsjoeba ... thanx for the response, but I really need to know if there is a way to swap levels....can't find any info on it.

Does anyone know if you can swap levels? And how?

Thanx for your help!

Yeldarb
September 15th, 2003, 12:26 AM
what exactly is a level? i think ur talking about depth which is what voetsjoeba posted

Digitalosophy
September 15th, 2003, 02:29 AM
i dont believe you can swap levels, but you shouldn't have to, you can unload the levels when they are not being used or just load another swf over that level

lostinbeta
September 15th, 2003, 02:49 AM
Uhhh... swapDepths(level)... swapping depths is swapping levels ;)

Digitalosophy
September 15th, 2003, 02:51 AM
lol yes that is true

lostinbeta
September 15th, 2003, 02:53 AM
To elaborate...

swapDepths() is a function that allows you to swap depths with either another movie clip, or to a set level.

targetClip.swapDepths(targetClipToSwapWith) will swap depths with another clip

targetClip.swapDepths(10000) will swap the depth of the targetClip and place it at level 10000 (which can be targeted at _level10000)

Sam
September 15th, 2003, 02:11 PM
I'm talking about swapping depths of levels, movies I've loaded into different levels. I need to keep the levels loaded, just switch the depth of them.

Say I have 3 movie clips, the parent.swf, ABC.swf, and DEF.swf.

I have a button that loads ABC.swf into level 1 over parent.swf.

I have another button that loads DEF.swf into level 2 over ABC.swf and parent.swf.

I want to keep both movies loaded just switch their level depths on button release.

I'm still learning Flash...
Would I just put "targetClip.swapDepths(DEF.swf)" code after the }on release code in ABC.swf movie?

You all rock! Thanx for the help!