FLASH,AS 3.0通用Loading方法.
第一帧的一个函数都搞定了,如果需要显示等其他效果的话在IF前面写吧~
// Create a simple loader script.
// Move to frame 2 after everything
// on frame 2 has loaded.
var monitor = setInterval(function(mainTimeline)
{
if( mainTimeline.framesLoaded == mainTimeline.totalFrames ){
clearInterval(mainTimeline.monitor);
mainTimeline.gotoAndStop(2);
}
}
,250,this);
// Stop on frame 1
stop();
// Create a simple loader script.
// Move to frame 2 after everything
// on frame 2 has loaded.
var monitor = setInterval(function(mainTimeline)
{
if( mainTimeline.framesLoaded == mainTimeline.totalFrames ){
clearInterval(mainTimeline.monitor);
mainTimeline.gotoAndStop(2);
}
}
,250,this);
// Stop on frame 1
stop();