Groups | Blog | Home
all groups > flash (macromedia) > april 2004 >

flash (macromedia) : How do I say "advance if next SCENE is loaded"??


Rob Feature
4/28/2004 11:13:12 PM
Hi guys...
I am new to flash...forgive me for my newbie-ness.

I have a preloader that I want to advance to the next scene, when that scene
(not the entire movie) is loaded. How do I do that?

Currently, I have a preloader that advances when the entire MOVIE is
loaded...it looks like this:

if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay("start");
}

can i modify this to say, "advance when the nextScene is loaded" instead? (as
a side note, what does "_.root" actually mean? does that stand for "this entire
movie"?)

Thanks in advance!
urami_
4/29/2004 7:51:58 AM

[quoted text, click to view]

The problem is that once you advanced to that frame in next scene you no longer in preloader
loop unless on that frame you jumping to you place another loader.
Anyway , using simple ifframe would do for you :

ifFrameLoaded ("labeLofFrameInNextScene") {
_root.gotoAndPlay("someLabel");
}

Keep in mind that the movie continue to load even if you stop the timeline.
SWF in streaming technology and it will load once open till entirely cached.
ANother note , DO NOT use scene as reference in your actions.
Scenes are blank frames that give an end to one and beginning to another timeline.
They don't exists upon export . In order to target scenes place a label names on frames
and use _root.gotoAndPlay("label"); in order to reach it.

[quoted text, click to view]

_root means the Main timeline of the movie you currently running.

Just add in regard to the loader.

Say you have two scenes , scene 1 has 100 frames and scene 2 has 100 frames.
You want to target frame 10 in scene two . Place a label on frame 20 and use this label in
ifFrameLoaded action , than attach another label on frame 10 and that's where you go with
_root.gotoAction .
You want to make sure all the content of that frame is loaded . The only way to assure it is to check
few frames after your target frame.


--

Regards


urami_*



<no>
http://flashfugitive.com/
</no>

AddThis Social Bookmark Button