Skip to main content
Inspiring
June 13, 2006
Question

preloader thingy

  • June 13, 2006
  • 1 reply
  • 116 views
what actionscript would i use to set it up so that after every 10 percent is loaded a movie clip called guy goes to and playsat a frame called throw?????i would really appreciate help.
thanks
This topic has been closed for replies.

1 reply

Inspiring
June 13, 2006
"Jimmathy" <webforumsuser@macromedia.com> wrote in message news:e6l8h8$onk$1@forums.macromedia.com...
> what actionscript would i use to set it up so that after every 10 percent is loaded a movie clip called guy goes to and playsat a
> frame called throw?????i would really appreciate help.
> thanks

This will work if your guy movieclip is loaded early in the process. (It has to be loaded before you can use it)
This is AS1 coding.
tralfaz

stop();

this.onEnterFrame = function()
{
var gbt = getBytesTotal();
if(gbt < 100)
return;
var gbl = getBytesLoaded();
if (gbl == gbt)
{
delete this.onEnterFrame;
box._visible = false;
}
else
{
var p = Math.round((gbl / gbt) * 100);
box.text = "Loaded " + p + " %";
if( !(p % 10) ) // if devide by 10 has no remainder
{
guy.gotoAndPlay("throw");
}
}
}