dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Preloader in one file

  1. #1
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188

    Preloader in one file

    Hi,

    I need to have a preloader in an AS3 project without an external loader.
    I unselected "export in first frame" in all my movieclips (with jsfl off course), and then I put everything in a frame that never gets seen, you know, the as2 way.

    Problem is, the way I understand it, is that in as3, flash will instantiate anything in the timeline, and only add it to the stage when the playhead visits that frame. So all the stuff I put in the "dump"-frame, will get instantiated.

    Any solutions?

    Thanks!

  2. #2
    AS2 intolerant person
    Join Date
    Jan 2009
    Location
    Swansea
    Posts
    352
    Problem is, the way I understand it, is that in as3, flash will instantiate anything in the timeline, and only add it to the stage when the playhead visits that frame. So all the stuff I put in the "dump"-frame, will get instantiated.
    thats not true actually.

    what you have to do is put the preloader on the first frame, then everything else afterward.

    make the timeline stop at the first frame, then create a COMPLETE event when all bytes are loaded to then move to the next frame.

    http://www.republicofcode.com/tutori.../as3preloader/

    flos

  3. #3
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    Yeah that's what I tried, but it was giving me problems with focus manager later on (for some reason, it actually created the objects that were on the dump-frame, I even put traces in the constructors and the stuff was traced).

    But I managed to solve it by making a movieclip with all the stuff that needs to be preloaded on frame 2, and put that on my dump-frame. Don't know why, but this works.

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