A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Best Preloader Code

  1. #1

    Best Preloader Code

    Dear Fellow Swishers

    I've been using swish for over a year now and for me, the best way to learn the effects & techniques is to download moves other have posted for review and use and see how they did what they did.

    In the movies I've looked at that are 100% swish, I've seen two common ways to code a preloader and wanted to take a quick moment to define those methods and get feedback on which method is best. I'm also hoping that this will help those new to swish with their own creations.

    Method 1 (contains 3 scenes)

    "Preloader" (58 frames)–contains an animation
    "End Loading"( 36 Frames)–contains a nice transition effect from the Preloader to the Main Movie
    "Main" (560 frames) – Contains the main movie and sprites

    Frame 0 of Preloader contains an "if frame loaded" command which holds the following code
    At Frame 0
    If Frame 550 of Main is loaded
    Goto Frame 0 of end Loading
    At Frame 58
    Goto Frame 0 of loading

    Method 2 (contains 3 scenes)

    "Preloader"
    "Main"
    "Blank Scene"

    Frame 0 of Preloader contains an "if frame loaded" command which holds the following code:
    At Frame 0
    If Frame 0 of _LAST_SCENE_is loaded
    Goto Frame 0 of _NEXT_SCENE_

    Frames 2-20 contain an animation effect

    Frame 30 contains a "Goto" command with the code:
    At Frame 30
    Goto Frame 0 of Preloader

    Frame 33 contains a "Preload content" command

    That's about it – Just looking for feedback on which is better or is there is a better method – “woohoo” bring it on

    Max
    10

  2. #2
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    Whatever works best for you.

    The blank scene method is pretty much unecessary. Using If Frame -1 of _LAST_SCENE_ is Loaded will instruct the preloader to load the entire movie. (Frame -1 will be interpreted as the Last Frame of the scene specified) Using a blank scene is just another way of looking for the last frame.

    Preloaders just distract your audience while all teh actors are getting ready to go onstage. It should load quickly and should be somewhat entertaining, and allow enough time for enough frames to load that will let your movie play smoothly. You don't have to preload the entire movie - in fact, I don;t recommend it unless your movie is short and the content is quite large for some reason.

    Hope this helps!
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center