Hi list...

Dumb throwback question:  my load progress bar isn't working.  I have
two frames, one to monitor the loading of the swf, and when it happens,
go to the next frame to init a singleton, but my load progress bar
doesn't show up until the swf is 100% loaded.  What am I missing here?

Thanks,
- Michael M.

//First frame:
_root.attachMovie("loading", "loading", 1, {_x:574, _y:494});
var l:Number = new Number(_root.getBytesLoaded());
var t:Number = new Number(_root.getBytesTotal());
var pct:Number = new Number(0);
_root.onEnterFrame = function():Void  {
        l = _root.getBytesLoaded();
        pct = Math.round((l/t)*100);
        _root.loading.progBar._width = pct;
        if (pct == 100) {
                delete _root.onEnterFrame;
                nextFrame();
        }
};
stop();


//Second frame: (inits singleton)
var o:ar = ar.getInstance();
o.init();
stop();

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to