A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: alternate preloader possibility

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    21

    alternate preloader possibility

    as mentioned last time i have a preloader in scene 1 and my movie in scene 2 but the preloader does not appear until about 17 %

    i am using this code:

    bytes_loaded = Math.round(_root.getBytesLoaded());

    bytes_total = Math.round(_root.getBytesTotal());

    getPercent = bytes_loaded/bytes_total;

    _root.loadBar._width = getPercent*100;

    _root.loadText = Math.round(getPercent*100)+"%";

    if (bytes_loaded == bytes_total) {

    _root.gotoAndStop(100);

    }

    \0



    in flash MX




    would it be possible to create an empty movie containing the preloader only and my main movie on the level above it and that the preloader would be based on the size of the main movie - i thought changing _root to _level 1 may acheive this ????

    is it possible




    thanks everyone - john

  2. #2
    Senior Member corky§urprise's Avatar
    Join Date
    Jun 2005
    Posts
    346
    Well, thats the problem with preloaders. 17% I think is pretty good, I mean, it cant load at 0 because then the preloader hasnt loaded yet
    Try simplifying it, see it that helps, less file space to load the preloader.

  3. #3
    Senior Member
    Join Date
    Jan 2006
    Posts
    137
    mine doesnt start until it reaches 87%!!! Thats so annoying... :/

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    the reason YOUR prelaoders are working like this.....is because they should be. (and I'll explain)

    if your putting your preloader in the SAME movie you are trying to "preload".. a certain percentage of the .swf needs to be downloaded before ANYTHING can displayed. so for you 17% has downloaded..before the preloader can be shown...so it shows how much has been DL'd.

    there are several ways around this.. one is almost similar to what was mentioned above..if you search..its a preloader that LOADS you main movie into _root....and replaces the current content.

    I would look into breaking up my content into seperate/external.swf's as well..

    you CAN use a preloader on an EMPTY movie clip..and loadMoive a .swf ito the target.

    Also see if you can export it at frame 1 for actionscript... see if that helps.

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Posts
    21
    using the last method - i did this first of all where i just had a flashing 'loading' sign on the level0 movie which loaded the main movie into level1 which worked fine, but my client wants a percentage preloader - is it possible to have a percentage preloader on level0 based on the size of the movie on level1

    any hints or links much appreciated

    john

  6. #6

  7. #7
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    _levels are themselves MovieClips. They get created when you load something into them, so you have access to getBytesLoaded property etc.

    There is nothing stopping you having a percentage loader on _level0 whilst loading the movie into _level1, the only concievable problem would be that it will obviously have a lower depth and has a chance of being obscured by the loading movie (depending on how you've layed them out of course).
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

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