Here is an example of the preloader used placed on the first frame of the movie.

this.onEnterFrame = function(){
        var loaded:Number = this.getBytesLoaded();
        var total:Number = this.getBytesTotal();
        var percent:Number = Math.floor((loaded/total)*100);
        load_txt.text = "Loading... "+percent+"%";
        loadBar._xscale = percent;
        if (percent == 100){
                gotoAndPlay(2);
                delete this.onEnterFrame;
        }
}
stop();


Mike


Mike wrote:
Are you basing the percentage on the frames loaded (100 * _framesloaded
/ _totalframes) or bytes loaded (100 * getBytesLoaded() /
getBytesTotal())? You should be doing the latter. If you are then ... um
.... *tags someone else*

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Boutin
Sent: Thursday, June 22, 2006 1:52 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Export frame option disabled

Hey everyone,

Im creating a preloader and I notice that it doesnt start until about 90% done loading the file. I believe this is because my ui components are exported to the first frame. I tried unchecking "export to first frame" with no difference. I also tried changing the actionscript setting to export it to frame 2 rather than 1, but it is unavailable to change (the field is disabled). Am I missing something here? ;) Thanks!



Mike
_______________________________________________
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

_______________________________________________
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




_______________________________________________
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