Flash loading bar

  • Ars
  • Newbie
  • Newbie
  • Ars
  • Posts: 7
  • Loc: Dubai

Post 3+ Months Ago

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.
  • Socno
  • Graduate
  • Graduate
  • Socno
  • Posts: 107
  • Loc: New York

Post 3+ Months Ago

Ars wrote:
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):

Code: [ Select ]
ifFrameLoaded ("Main", 1) {
  gotoAndPlay("Main", 1);
}
  1. ifFrameLoaded ("Main", 1) {
  2.   gotoAndPlay("Main", 1);
  3. }


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:

Code: [ Select ]
ifFrameLoaded ("Main", FrameNumberYouWantToBeLoaded) {
  gotoAndPlay(FrameNumberInTheLoadingScene);
}
  1. ifFrameLoaded ("Main", FrameNumberYouWantToBeLoaded) {
  2.   gotoAndPlay(FrameNumberInTheLoadingScene);
  3. }


Lets say frame 1 in the Main scene is loaded, and we have used this command:


Code: [ Select ]
ifFrameLoaded ("Main", 1) {
  gotoAndPlay(5);
}
  1. ifFrameLoaded ("Main", 1) {
  2.   gotoAndPlay(5);
  3. }



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.

Code: [ Select ]
ifFrameLoaded ("Main", number) {
  gotoAndPlay("Main", 1);
}
  1. ifFrameLoaded ("Main", number) {
  2.   gotoAndPlay("Main", 1);
  3. }
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

Socno - please use code tags when posting, thanks. :)

Ars - as for the answer to your question, he gave you one that will
certainly work. However the methods of ifFrameLoaded are deprecated
or outdated and are not used much, if at all any more.

What you really want to do is a preloader that shows progress of the
download. The best tutorial on this was written by our own Lostinbeta:

http://www.kirupa.com/developer/mx/perc ... loader.htm
  • Socno
  • Graduate
  • Graduate
  • Socno
  • Posts: 107
  • Loc: New York

Post 3+ Months Ago

UNFLUX wrote:
Socno - please use code tags when posting, thanks. :)

Ars - as for the answer to your question, he gave you one that will
certainly work. However the methods of ifFrameLoaded are deprecated or outdated and are not used much, if at all any more.

What you really want to do is a preloader that shows progress of the
download. The best tutorial on this was written by our own Lostinbeta:

http://www.kirupa.com/developer/mx/perc ... loader.htm



Will do the nex time, I am so sorry.
  • Ars
  • Newbie
  • Newbie
  • Ars
  • Posts: 7
  • Loc: Dubai

Post 3+ Months Ago

thanx so much u guys
  • LamThienPhong
  • Born
  • Born
  • LamThienPhong
  • Posts: 1

Post 3+ Months Ago

thanks so much, guys
  • XKEC
  • Newbie
  • Newbie
  • XKEC
  • Posts: 13
  • Loc: London, UK

Post 3+ Months Ago

I have only just begun to start finding my way around Flash Pro 8. I looked at the tutorial above for creating a "loading" icon, which was demonstrated with a picture (see http://www.kirupa.com/developer/mx/perc ... loader.htm). This was excellent and just what I needed.

However, I have created a few slide shows in Flash, using the standard templates that come with Flash Pro 8. These vary in size, but in general are around about 1mb.

I need to show a "loading" bar for my visitors when they open up pages with slide shows on, but I am not sure how to code the example given above into a slide show. I tried to insert the above code into the slide show but it doesn't work.

Any help with this would be much appreciated :?

P.S. I have tried using the same code in the example and inserted it in the timeline before the slideshow but failed result.
  • XKEC
  • Newbie
  • Newbie
  • XKEC
  • Posts: 13
  • Loc: London, UK

Post 3+ Months Ago

Just worked out what might be wrong. With Flash Pro 8 you have two different types of templates you can load for slide shows. They are;

Presentations or Slide Presentations.

I have been selecting Slide Presentations which gives you an easy way to add slides without touching the timeline. This is where I cannot add frames prior to the presentation to have a loading bar displayed.

The simple "Presentations" template shows me the full timeline and layers, which although I can display the timeline with "Slide Presentation" templates, the layers appear to be hidden and you cannot acheive a successful frame insertion on all of them. :roll:
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

There are many ways to preload ...
check out ...
http://www.gotoandlearn.com
vid tutorials ...

good luck :)
  • XKEC
  • Newbie
  • Newbie
  • XKEC
  • Posts: 13
  • Loc: London, UK

Post 3+ Months Ago

Cheers.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

waaah, reminds me of the times when i started flash and wanted so bad to create a preloader. I had the right idea in mind but for some reason it didnt work. I never succeeded in making a preloader using in frame2: gotoAndPlay(1). But then, after i found about onEnterFrame everything changed and a new era began :D
  • thecoolzero010
  • Born
  • Born
  • thecoolzero010
  • Posts: 1
  • Loc: Alexandria,Egypt

Post 3+ Months Ago

mmm good topics :D
  • DJ21Raca6
  • Born
  • Born
  • DJ21Raca6
  • Posts: 1

Post 3+ Months Ago

thank you guys

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.