-
Hi there,
I have 3 levels loading up from level 0, level 1,2 and 3.
Levels 1 and 3 are masked out whilst there are loadin up and will stop at there next scene when they are loaded.
Level 2 however will have a loading messsage on it and will be seen by the user, but what I'm having trouble with is
the code at the last frame of level2's loading up scene...?
I want level2 (at its last frame) to check if level 1 and 3 have loaded up, before they play next scene...?
here is the code i have already,in the last frame of level2:
if (_level1_totalframes>=62) {
_level1.gotoAndPlay("walk");
gotoAndPlay ("scene2", "fly");
if (_level3_totalframes>=62) {
_level3.gotoAndPlay("start");
gotoAndPlay ("scene2", "fly");
} else {
//this will loop the action
gotoAndPlay ("re");
}
}
need help big time,
cheers
matt
-
_level0 loads _level1/2&3, you want to determine whether _level1 has loaded from _level2?
Place a set variable in the last frame of _level1 which says something like:
_level0.myLoaded1 = 1;
then create a loop in _level2 which test for level0.myLoaded1, if it exists, then execute your next code.
hope this helps...
-
still not there
Thanks for your help, but I'm still struggling...
I've put this code in the last frame of level2, and have set variable in
level 1,
if (_level0.myLoaded1=1) {
_level1.gotoAndPlay("start");
//this code takes level 2 to label in next scene
gotoAndPlay ("menuStart");
} else {
gotoAndPlay ("loop");
}
it doesn't seem to work, I'm quite new with variable's, thats probably why,
why is the variable called
_level0.myLoaded=1
does it reference back to _level0. or something???
thanks for your help on this but its rather desparate that i get it figured
out...
cheers
matt
-
OK, let me explain it a different way. Forget your problem for the mo, just run with this.
_level0:
load movie 1.swf into _level1 (100 frames)
load movie 2.swf into _level2 (500 frames)
_level1 wants to know whether _level2 has loaded. If it has, _level1 wants to send a message to the output window using trace().
In last frame of _level2 (frame 500) place code in like this:
_level0.lev2Loaded = true;
In a layer on _level1 movie, place a movie clip (empty) with on event(enterframe) actions. This will create a loop.
The actions say something like:
If (_level0.lev2Loaded == true)
trace("Level 2 is loaded");
do some other stuff...
because on (enterframe) is a loop, it will continue to evaluate whether _level0.lev2Loaded is true, if it isn't it won't do anything, if it is, it will!
hope this is more helpful...
-
it works!!!!!!
Hey what can i say, you've really helped me out...
I'm on a bit of a steep learning curve at the moment and what you posted up
was really usefull...
saw your site looked pretty cool mines in development at the moment but
check it out when you have some free time,
http://www.trigone.co.uk
cheers
-
glad I could help.
btw, very slick site, I like it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|