A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: preloader...:P

  1. #1
    Hey I am having troubles with a preloader in a multi-scene movie.

    I have given the preloader a scene for itself (first scene). I am using the _root.getBytesTotalLoaded() and _root.getBytesTotal() or whatever they are called. So when I uplod it and go to view it in IE on my remote server, IE takes a while to download it, then it initializes. When the preloader comes in, it already says 100%, defeating the whole purpose of the preloader. IE loads the WHOLE MOVIE as opposed to just loading the first scene which in turn would load the rest. Has anyone else had this same problem or one similar? If so, could you please post your solution

    Thanks very much in advance!

    (p.s. I can post codee if required)

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Please post your code. And make sure that your preloader actions are at the same time as your preloader imagenot before. But um...ya, post your code and i'll take a look.

  3. #3
    Junior Member
    Join Date
    Apr 2002
    I've been having similar problems. This is with preloaders on externaly loaded swf's It seems to be that if you just load it in to a numbered level it works, but loading into a named movie placeholder... and it does not. may have something to do with it being loaded into an already externaly loaded swf...

  4. #4
    For medicinal use only.
    Join Date
    Apr 2002
    do u have linked files in your movie?

    cuz flash requests the linked files before it loads the frames..so if if u do then go to:


  5. #5
    Senior Member
    Join Date
    Apr 2000
    for darakin,
    if you have preloaders in an externally laoded swf remeber that bytesloaded refers to the main movie, which is the one you are loading into.
    Your preloader may work when you test the movie on its own as it is the main movie. but when you load your swf into another movie which has already loaded you will of course get 100% loaded.
    You need to specify the path to the timeline you are trying to preload.
    If your actionscript is right on the maintimeline, using

    this.getBytesTotal() and

    would work, if its in a mc on the timeline, use _parent.getBytesTotal()


  6. #6
    Hey, the following code is in frame 111 of scene 1:
    loadPercent = (Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%");
    loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
    if (_root.getBytesLoaded() == _root.getBytesTotal()) {
        // Check for finished loading
        // If loaded, final update to fields
        loadPercent = "100%";
        loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
        // Where to go once your movie is loaded
    Then, in frame 112, we have a loop:
    // Loops back to continuosly update text fields
    And, as you may have guessed frame 113 is labelled "Loaded".

    I have text fields, etc that point to the variables...and they are accurate, however they go straight from 0% to 100%, lol, without shwoing any progress. I am pretty sure the objects in the library are not linked to external sources, as I imported them.

    The SWF is a movie on its own, not embedded into any other. Refer to http://tymerdesigns.com/johnrau/home.swf to see how it is...

    Thanks very much again.

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Why frame 111?? why not frame 1 of scene1? At that frame the movie may have be actually downloaded and the 100% that shows may be accurate


  8. #8

    Movie is going at 52 fps, so the text that says loading does anutty tween then the bar fades in, etc...thats why it is at 111...gparis youcould be rite..

  9. #9
    Senior Member
    Join Date
    Apr 2001
    I think gparis is right, make your preloader on frames 1 and 2, then put your "nutty tween" in a movie clip, this way your preloader gets updated way more often, and your loading image thinger still works properly.

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