A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Preloader not showing up

  1. #1
    Senior Member
    Join Date
    Nov 2003
    Posts
    385

    Preloader not showing up

    So I have this preloader on my Flash movie and the problem is that when you go to the URL it does not show - the white page sits there for up to 15 seconds with no preloader. in the progress bar it says "transfering data from welcome runners" Please see www.welcomerunners.com

    My preloader code is:

    onClipEvent (enterFrame) {
    loaded = _parent.getBytesLoaded();
    total = _parent.getBytesTotal();
    progress = Math.round((loaded/total)*100);
    loaderInfo = Math.round(loaded/1000) + " k loaded / " + Math.round(total/1000) + " k total";
    progressBar._width = progress;
    if(loaded == total) {
    _parent.gotoAndPlay(2);
    }
    }

    Anyone???

  2. #2
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    Why are you using _parent.getBytesTotal() ? I think that should be _root. Other than that it should work.

    Change all your _parents to _root

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    well that helped but we're not quite there yet - now I still get the white page for quite a while then the preloader flashes up quickly and the page loads. So it's like the preloader waiting for the movie to load then it bounces right past to frame 2.

  4. #4
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    So that means you are most likely using Components and you need to set them to not load in the first frame.

    Do a search and you might find examples but it's very simple.

    http://livedocs.adobe.com/flash/mx20...=00002016.html

  5. #5
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    Thanks I'll look it up

  6. #6
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    the thing is I am using a lot of Movie Clips Linked from the library. So If I uncheck export in first Frame do I have to put all the linked clips on the stage off to the side? this seems so sloppy. I would rather specify which frame they should load in - can I do that? I looked for this but did not find anything.

  7. #7
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    Anyone?

  8. #8
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    do I have to put all the linked clips on the stage off to the side
    yes

    gparis

  9. #9
    Registered User
    Join Date
    Mar 2013
    Posts
    1

    Hi I am facing same problem with my site, could you help me please ???

    Hi, I am working on Ac3, and making a preloader here, but when I upload it to server it shows only white page with 4 dots custome loader which I haven't created once the site loaded for fully it flashes my preloader for a second and than my site will run for rest pages. I can't figure it out form where this custom preloader coming and why my preloader flashes at the end. here is my code for your reference :

    stop();

    this.addEventListener(Event.ENTER_FRAME, loading);

    function loading(e:Event):void {

    var total:Number = this.stage.loaderInfo.bytesTotal;
    var loaded:Number = this.stage.loaderInfo.bytesLoaded;

    bar_mc.scaleX = loaded/total;
    loader_txt.text = Math.floor((loaded/total)*100)+ "%";

    if (total == loaded) {
    play();
    this.removeEventListener(Event.ENTER_FRAME, loading);
    }

    }

    Please help me, Thanks.

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