FLASH加载中让进度条显示流畅

在FLASH网上加载的过程中,有时因为网速快会出现好像没有加载(加载一闪而过,好像FLASH制作中有错误,可以采用以下方法解决这个问题:
stop();
var _t=1;//速度限制参数
var _p;//当前文档加载参数
onEnterFrame = function ()
{
    _t = _t +1;
    _p = Math.min(_t, Math.floor(_root.getBytesLoaded() / _root.getBytesTotal() * 100));
    progress.indicator.setwidth(_p);//加载进度条的相应变化
    if (_p == 100)//加载完成动作
    {
        delete onEnterFrame;
        play();
    } // end if
};

posted on 2004-09-29 14:58  软件下载园  阅读(3509)  评论(1)    收藏  举报

导航