Loader not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aditiverma27
    New Member
    • Jul 2010
    • 3

    Loader not working

    Hi,

    I am new to Flash, and I am trying to make this website, which has separate files for different screen resolutions. I am using a first.swf file to load the right file, depending on the screen resolution. I have placed a loader on the frame like this:

    Code:
    _root.loadMovie("filename.swf", mcholder);
    
    loadingbar.onEnterFrame = function() {
    kBytesLoaded = this._parent.mcholder.getBytesLoaded() / 1024;
    kBytesTotal = this._parent.mcholder.getBytesTotal() / 1024;
    percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
    txt1.text = percentage;
    if (percentage == 100) {
    delete this.onEnterFrame;
    }
    }
    This originally was not working at all. Then I replaced

    Code:
     _root.loadMovie(...);
    with

    Code:
     mcholder.loadMovie(..);
    This is not working either, the screen flashes for one second and then disappears. I put a stop(); before the code, and the screen remained, but the movie still did not load.

    Can anyone please help me out with this one? I don't know what I am doing wrong here. Any help will be greatly appreciated.
Working...