Thanks everybody,

I use your function with setInterval and clearInterval and it works fine. A
loop must be defined in order to wait complete load of movie. When I didn't
wait, movie only loaded 80% of bytes and began to execute itself. The result
was that sometimes it seems to work fine, sometimes doesn't.

function loading() {
 var tot, lod, per;
 tot = _root.getBytesTotal();
 lod = _root.getBytesLoaded();
 per = Math.floor( (lod / tot) * 100 );

   if (per >= 100) {
    clearInterval(thread);
    gotoAndPlay( frame2 );
 }
}
var thread = setInterval(loading, 1);
stop();

Best regards, Gorka.



2007/1/16, Amandeep Singh <[EMAIL PROTECTED]>:

Preloader code is here:

var lod = this.getBytesLoaded();
var tot = this.getBytesTotal();
var per = (lod / tot) * 100;

if(per >= 100) {
        // Jump to the desired frame
} else {
        // Jump to the desired frame
}


_______________________________________________
[email protected]
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