all groups > macromedia flash sitedesign > january 2006 >
You're in the

macromedia flash sitedesign

group:

Page Transitions



Re: Page Transitions tralfaz
1/25/2006 3:17:55 PM
macromedia flash sitedesign: [quoted text, click to view]

Timeline based websites are not very flexible. It's much easier to
make each section a movieclip, then you can play them as needed, or
use swapDepths to move one thing above another. Depths determine the
vertical display stacking order.

If you have to do it with one long timeline you will need to have
different places in the timeline where "about us" is above "main" and
another section of the timeline where the reverse is true. then jump
to that point in the timeline as needed. (but if you can learn to use
movieclips instead you will get a much smaller file and more flexible
site)
tralfaz

Page Transitions jonnie1988
1/25/2006 11:02:51 PM
Hey,

I've started making my first ever flash website and I've encountered a
problem. Say I'm on the "home" page of the site, and I click something like
"about us" to get to that page. I want the "about us" page to animate over the
top of the "home" page, but then when I click the "home" page again, i want it
to animate in over the top of the "about us" page.

I don't understand how this can be achieved, as I have each page on a seperate
layer, but whatever page is on the highest layer will display over the top of
the other one... and I don't know how to change this, can someone help please?
Re: Page Transitions jonnie1988
1/26/2006 12:00:00 AM
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.
Re: Page Transitions tralfaz
1/26/2006 11:42:47 AM
[quoted text, click to view]

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



AddThis Social Bookmark Button