View Full Version : Animating the page about to be unloaded
yakken
10-11-2002, 09:17 PM
Here's my situation:
I have a document with eg. 4 pages. Each page can be accessed by a button wich loads the page using the LoadMovie command into, lets say, level 2. My question is now:
I would like the page already loaded into level 2 to do something (an animation) before the new page is loaded into the same level (hereby unloading the first page).
Something like what has been done in
http://www.romiglia.com/essentials/
Here the old page does something before it is unloaded...
How do I do this?
/yakken
ScratUAD
10-12-2002, 01:48 PM
it seems to me... like each scene has a copy (A) of the last frame of each other scene at the beginning... as a movie clip.
the button you press tells the next scene which clip to play the "unload animation" (A). at the end of each clip, it tells flash what to play next.
so basically you have the loading clips... and the unloading clips...
the unloading clips are contained at the beginning of each scene.
once a clip is loaded and the user selects a button, that button tells what scene to go to and what unload clip to play.
when the unload clip plays it then tells that scene what frame to go to.
am I clear as mud?
there's probably an easier way, but I'm not sure.
Sir Patroclo
10-13-2002, 11:52 AM
Hi
In a quick and sleepy view, I think the inter-animation is present at the beggining of every MC.
I had a similar question some time ago and posted it here, with a solution scripted by Sumul. The thread is at
http://www.actionscripts.org/forums/showthread.php3?s=&threadid=14970
It worked for me. Hope it helps you as well.
Greetings
Sir Patroclo
yakken
10-13-2002, 02:53 PM
The .zip file uploaded in your thread still doesn't do the trick... I want exectly the same as you did, but the MX code doesn't make your movie play to the end - it only waits for the movie already loaded to reach its final frame. And as this movie is stopped it will never reach the end...
I would like a button to make the clip already loaded play a kind of outtro (opposed to intro :) ) and then switch to the movie selected by the button. I can't see how the suggestions do that?
The page you refer to is what I want to do, so if you have an example of what you did to make it work as www.wmteam.de please send me a link - I would be forever grateful...
/yakken
www.potenso.dk
Sir Patroclo
10-14-2002, 05:58 AM
Yakken:
Here's how I set up my code to achieve the "waiting" function:
Four buttons, each with the script by Sumul, changing the .swf to be loaded on release according to the button, of course. In each external movie, I set up the INTRO and then a stop() action. There's where the navigation and stuff takes place. The frame following that stopped frame has a label, "next". So, when the button is pressed, it continues to that frame, wich is the beggining of the OUTRO. Something like this:
on (release) {
if (!_level1) {
loadMovieNum("themovieIwant.swf", 1);
} else {
_level1.nextMovie = "themovieIwant.swf";
_level1.onEnterFrame = function() {
if (this._currentframe ==this._totalframes) {
delete this.onEnterFrame;
loadMovieNum(this.nextMovie, 1);
}
};
}
}
//and this part is when the user clicks another button
on (press) {
_level1.gotoAndPlay("next");
}
That way, the movie plays the OUTRO and the next movie is called into level 1. Another thing I added was a little script to disable the buttons while the INTRO and OUTRO is played, so, if the user clicks another button, it doesn't skip violently. That script is attached to the beggining of the INTRO and OUTRO in each .swf to be loaded. And a script to enable back the buttons at the last frame of the .swf
Something like this (I loaded my buttons set into level 10):
_level10.button1.enabled=false;
_level10.button2.enabled=false;
and so on...
Well, I'm sure you can adjust and develope a script that suits you better. I've learned A LOT switching and tweaking (and freaking out) different scripts.
Greetings
Sir Patroclo
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.