Article

Optimize Preloading with Flash 5

Page: 1 2 3

Drag an instance of the "Go To" action. Select the settings to Scene 2 and frame number 1. This action tells Flash what to do when all of the frames of scene 2 are loaded. In this case, the movie automatically goes to and begins playing frame 1 of scene 2:

701_opt7

Now, choose frame 5. From the ActionScript Inspector drag "Go To" and add the settings Scene 1, Frame 1. This will cause the animation to keep repeating until all the content in Scene two is loaded, as shown here:

701_opt8

Time to Test

The movie can now be tested. Press F12 to preview in your Web browser. You will notice that while Scene 2 is loading the animation will keep repeating. The more content you have in scene 2, the longer the preload scene will be displayed. The movie in Scene 2 is very short. To see the full effect of the preload script, import an MP3 file into scene 2. Most MP3 files are in excess of 1 MB in file size. When you place the movie on a Website, it will allow you to view the preload script in action while the MP3 downloads.

Preloading allows you to create movies that have the same impact to a cus-tomer whether they access the Internet on a dial-up modem or a dedicated high-speed connection. The above script provides a great deal of flexibility. Why not have a company logo animate for the first scene? Or, you could display a simple Flash game, or even a short presentation outlining what is to be covered in the main movie when it has downloaded. The possibilities are endless!

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links

Rate This Article

  • 1
    Poor
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
    Great

Comment on This Article

Have something to say?

Post A Comment

You need to be a member of the SitePoint Forums to comment on this post. Sign Up

Already a member? Post using your SitePoint Forums account: