A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: pre-loader loads 80% of file before loading itself

  1. #1
    Knowledgable n00b BlueGeek's Avatar
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    137

    pre-loader loads 80% of file before loading itself

    Hey,

    I am having issues with the pre-loader for a project I've made. The SWF loads itself almost entirely before even displaying Frame 1 (the pre-loader). Said pre-loader exists in it's own scene; when this scene is exported on it's own, the file size is 1.6 megs (the full export of all scenes is 1.9 megs). There is VERY little content in the preloader, in fact, a blank first scene exported on it's own is ALSO 1.6 megs. There is, however, a lot of content throughout the rest of the file (music, graphics, font, all embedded at the request of a client).

    It looks sort of like it's trying to ensure that some arbitrary amount of the resources are present before the first frame loads.

    I used to be deep into Flash way back in the CS3 days, but haven't touched it since; the result is I am fairly familiar with AS3 but CS5's new features (many of which seem to replace entirely code-oriented methods with point and click methods) often times make me scratch my head, so you'll have to forgive me if this is the sort of 'five times a week question' y'all are numb to by this point. Google searches have given me a sort of meek idea of what's wrong, but I'm still not entirely sure.

    I've already scraped every last little bit of that awful TLF text stuff from the project, and I've fiddled with the action script settings but haven't had any luck.

    I'm not exactly sure what code to post here, as little of it seems relevant (after all, the problem appears to be happening before anything I've written runs). Please, though, if there's anything I can do to make this more clear, I'm totally willing to oblige.

    As always, thanks in advance (especially if you've managed to read through my wordiness to this point)

    -Sandy
    "...there were only two good books in the hotel gift shop and I had written both of them."
    -Douglas Adams

  2. #2
    Knowledgable n00b BlueGeek's Avatar
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    137
    So this feels a little bit hacky, but it works.

    My entire pre-loader is in one scene, but it doesn't leave the first frame until the file is 100% loaded. After messing around with a couple settings that only the bravest would so much as look at without a backup, I found "export class files at frame _" (or something like that, it's not in front of me, right now). By default, it exports them on the first frame; so embedded music and fonts need to fully load before they can be exported and the first frame can run. Setting it to 2 (the first frame in my movie past the pre-loader) allowed all of the files to load before Flash ever considers them "needed". The only downside I've found so far (aside from the aforementioned hackyness) is that I can't use any fancy fonts in the pre-loader (for, say, a percent counter).

    If anyone has a proper solution to this problem I'd still be very interested.
    "...there were only two good books in the hotel gift shop and I had written both of them."
    -Douglas Adams

  3. #3
    Senior Member
    Join Date
    Feb 2006
    Location
    Düsseldorf, Germany
    Posts
    142
    hey,

    you should do like this:

    you need to have 2 swfs.

    1st - preloader.swf ( with only preloader graphics )
    2nd - content.swf ( where all you actual content is )

    and then. preloader should load the content and place it on the stage.

    tada!
    --
    there is a place for those who dare to dream...

    Flash Developer
    VISTAPARK GMBH
    BÄRENSTRASSE 11-13
    D-42117 WUPPERTAL

  4. #4
    Knowledgable n00b BlueGeek's Avatar
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    137
    Quote Originally Posted by ifmi View Post
    hey,

    you should do like this:

    you need to have 2 swfs.

    1st - preloader.swf ( with only preloader graphics )
    2nd - content.swf ( where all you actual content is )

    and then. preloader should load the content and place it on the stage.

    tada!

    I'm a little confused by this, how do I link the two files together? I see in actionscript settings there's an option to select a custom pre-loader but it's grayed out for me.
    "...there were only two good books in the hotel gift shop and I had written both of them."
    -Douglas Adams

Tags for this Thread

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