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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.