dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: need help with preloaders & scenes

  1. #1
    Junior Member
    Join Date
    Jun 2003
    Location
    Florida
    Posts
    2

    need help with preloaders & scenes

    I am trying to create a preloader in the beginning of a movie that has 8 to 12 scenes in it. I am not able to make any preloader to work. I have tried many components, tutorials, and my own knowledge and cant seem to make it work. Am I out of luck with the scenes or is there another way? Any help woudl be greatly appreciated.

    Thanks,

    Ryan Srofe

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    116
    Ryan, the amount of scenes shouldn't matter, but it is important however to have the preloader scene as the very first scene (you can do this through Modify>Scene).


    Here's what I usually use:
    In the preloader scene create two frames on a layer. On the 2nd frame add this code:

    if (_root.getBytesLoaded() != _root.getBytesTotal()) {
    gotoAndPlay(1);
    } else {
    play();
    }

    --This will check whether the entire movie has loaded, if not, then it will go back to frame 1, which will go to frame 2 again and check...this process will repeat again and again as you can imagine until the entire movie has loaded in which case the movie will continue to play the next scene.

    P.S. add some text in a new layer, say "Loading" and you're good. Adding bar graphs or other visuals will give your viewers some visual feedback as to how much longer for the movie to load.

  3. #3
    Junior Member
    Join Date
    Jun 2003
    Location
    Florida
    Posts
    2
    That doesnt seem to work either. When I set the preview to show streaming it never gets past frame 0. In the code that you provided it should toggle between frame 1 and 2 till it is loaded. Thank you for your time though.

    Ryan

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