stop ();
this.onEnterFrame = function ()
{
var _loc3 = this.getBytesLoaded();
var _loc2 = this.getBytesTotal();
if (_loc3 >= _loc2 && _loc2 > 4)
{
delete this.onEnterFrame;
gotoAndPlay("movie",1);
}
else
{
var _loc4 = _loc3 / _loc2 * 100;
loading._xscale = _loc4;
mytxt.text=int(_loc4) "%";
} // end else if
};
PS:这里的movie是一个场景。
原文:http://www.jb51.net/flash/actionscript/4071.html