A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Why won't my external swf preloader work?

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    19

    Why won't my external swf preloader work?

    I have a swf called ladiesrings.swf that is a 6MB size file due to about 140 images that are dynamically loaded into a sliding photo gallery from the library.

    Because this is such a large file, I need a preloader. So I've used a tutorial for an external swf preloader, and it's loading the movie, but it's still showing a blank page until the movie is loaded? I'm really confused. Why isn't this working?

    First frame actionscript for preloader:

    siteLoader.loadMovie("ladiesrings.swf");
    loadingBar._xscale = 1;
    loadingBar.onEnterFrame = function() {
    kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
    kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
    percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
    this._xscale = percentage;
    if (percentage == 99) {
    delete this.onEnterFrame;
    }
    }

    if (percentage == 99) {
    this._parent.loadingBarFrame._alpha = 0;
    this._alpha = 0;
    delete this.onEnterFrame;
    }

  2. #2
    Junior Member
    Join Date
    May 2008
    Posts
    19

    resolved

    Finally able to get this working. Ended up using a different external swf preloader tutorial and it was doing the exact same thing. Was working during my test in flash, but then when uploaded, it was showing a blank page. Turned out to be some kind of problem with the way the swf file was embedded, so I opened a brand new page - reinserted it, and it worked great.

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