Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you connect a preloader to a different scene

Status
Not open for further replies.

dunskii

Programmer
Sep 14, 2001
107
AU
Hi all,

I was wondering how you create a preloader that runs in a different scene.

Thanks
Dunskii
 
Normally a preloader is in a different scene, the first one in the scenes' order.

Here's a very basic preloader, that does the job, but in this case displays nothing:

Frame 1:
If (_root.getBytesLoaded >= _root.getBytesTotal){
gotoAndPlay("Scene 1", 1)
}

Frame 2:
If (_root.getBytesLoaded >= _root.getBytesTotal){
gotoAndPlay("Scene 1", 1)
}

Frame 3:
gotoAndPlay(2);

Frame 1 should be kept blank and is to avoid seeing a flash frame of the preloader on subsequent visits after the first one. Frame 2 & 3 can have other layers displaying a loading message, dynamic textfields indicating what percentage has loaded or remains to be loaded, etc...

You should replace "Scene 1" by the actual name of the scene you're targeting. To change the other of scenes, open the scene panel, and simply drag your scenes in the order you want them.

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top