heyo people. ok, now im still pretty much an amature in flash and was wondering how it would be possible to create a loading bar at the begining of a flash intro or site.
First of all, make a new scene wich you can call Loading.
Rename your main scene to "Main" or something.
Since your new in flash i suggest that you just use a simple animation that just says "Loading..." instead of a countdown or a processbar.
In your Loading scene insert his code in the last frame of your animation(lets say it is frame 15):
ifFrameLoaded ("Main", 1) {
gotoAndPlay("Main", 1);
}
- ifFrameLoaded ("Main", 1) {
- gotoAndPlay("Main", 1);
- }
When frame 1 in Main is loaded it will stop playing the Loading scene, and jump over to the Main scene
----------------------------------------------------------------------------------
If you got animation in more then 1 frame in the main scene(as you probably have) you can use this code:
ifFrameLoaded ("Main", FrameNumberYouWantToBeLoaded) {
gotoAndPlay(FrameNumberInTheLoadingScene);
}
- ifFrameLoaded ("Main", FrameNumberYouWantToBeLoaded) {
- gotoAndPlay(FrameNumberInTheLoadingScene);
- }
Lets say frame 1 in the Main scene is loaded, and we have used this command:
ifFrameLoaded ("Main", 1) {
gotoAndPlay(5);
}
- ifFrameLoaded ("Main", 1) {
- gotoAndPlay(5);
- }
While loading Main 1, frames 1-4 in the Loading scene has been played. When Main 1 is loaded it will jump over to Frame 5 and continue playing from there.
In this loading-thing, you can have an animation from frame 1-4... Like saying 25% done. From frame 5-9 you can have like a animation saying 50% done. And so on.
Keep doing this until you have loaded all the frames in the main frame.
Remember when you are going to load the last frame in the Main scene, use this code on the last frame in your Loading scene.
ifFrameLoaded ("Main", number) {
gotoAndPlay("Main", 1);
}
- ifFrameLoaded ("Main", number) {
- gotoAndPlay("Main", 1);
- }