[quoted text, click to view] "jonnie1988" <webforumsuser@macromedia.com> wrote in message
news:dra4r8$jip$1@forums.macromedia.com...
> In scene 1 I have 7 layers, and only 1 frame. I have a "home" layer
> "about us"
> layer, an "actions" layer, and a "labels" layer, aswell as the other
> layers for
> each different page.
>
> In the "home" layer I have the "home_mc" movie clip. This contains
> all the
> home content, and the animation which is played before the home page
> is
> displayed, and also the animation played to get rid of the home page
> before
> another page appears. Is this what you're talking about?
>
> If it is, what I want to know how to do is make the "about us"
> animation play
> over the top of the "home" page, but the "home" page is in a higher
> layer in
> Scene 1, so I don't see how this can be done?
>
> If it's to do with swapDepths do you know anywhere I can learn how
> to use
> these?
>
> Thanks a lot for replying.
Ah.. good, you don't have to do much then. Just use swapDepths on the
movieclips. This code would swap the depths two movieclips with
instance names of mc1 and mc2. The one with the higher depth number
is on top and will show.
mc1.swapDepths(mc2);
If you run the command again they switch back the way they were
before.
You can also give movieclips a specific depth number. Let's say you
have 3 movieclips all stacked one above another and you want to rotate
the stack every time a button is clicked. This button code below
would rotate the depths of 3 movieclips with instance names of mc1,
mc2, and mc3. It increments the depth number of each one and the one
that increments to 4 gets switched back to depth 1 again.
// code attached to a button
on (release) {
// initialize the stacking order the first time
if(!section1 || (section1 == undefined))
{
section1 = 1;
section2 = 2;
section3 = 3;
}
// increment the sections to the next highest number
section1++;
section2++;
section3++;
// roll them over after they go past the limit of 3
if(section1 > 3)
section1 = 1;
if(section2 > 3)
section2 = 1;
if(section3 > 3)
section3 = 1;
// switch the stacking order to 10 20 or 30
mc1.swapDepths(section1 * 10);
mc2.swapDepths(section2 * 10);
mc3.swapDepths(section3 * 10);
}
There are lots of ways to do this same thing. I know it can be hard
to make sense of the Actionscript if you aren't used to using it so I
laid this out in a way that is simplified for easier readability.
tralfaz