【骗子举报收录系统源码分享】【resty源码分析】【treeset源码讲解】加载条源码_加载条制作

2024-12-23 03:11:06 来源:java applet源码 分类:热点

1.网页播放flash的加载进度条代码?
2.教你用progress库实现进度条,还教你改源码避坑

加载条源码_加载条制作

网页播放flash的条源骗子举报收录系统源码分享进度条代码?

       var myLoading:MovieClip;

       var loadInfo:MovieClip;

       var _lineBgcolor = "0x";

       var _lineColor = "0xFF";

       var _lineLen:Number = ;

       var _lineH:Number = 3;

       var _txtColor; var _txtAlign:String = "center";

       var tb:Number;

       var txtFormat:TextFormat = new TextFormat

       ("Arial", null, 0xffffff, true); myLoading = _root.createEmptyMovieClip("myLoading",); //进度条

       loadInfo = myLoading.createEmptyMovieClip("line", );

       loadInfo.lineStyle(1, _lineColor, );

       loadInfo.moveTo(0, 0);

       loadInfo.lineTo(_lineLen, 0);

       loadInfo.lineTo(_lineLen, _lineH);

       loadInfo.lineTo(0, _lineH);

       loadInfo.lineTo(0, 0); //进度显示文本

       loadInfo.createTextField("txt", , 0, 0, _lineLen, );

       loadInfo.txt.autoSize = _txtAlign; //设置进度条的位置(居中于主场景)

       loadInfo._x = (Stage.width - _lineLen)/2;

       loadInfo._y = Stage.height/2; //获得影片大小并stop,再onEnterFrame

       tb = _root.getBytesTotal();

       _root.stop();

       myLoading.onEnterFrame = function(){

        var lb:Number = _root.getBytesLoaded();

        var percent:Number = Math.round(lb/tb*);

        loadInfo.txt.text = percent+"%";

        loadInfo.txt.setTextFormat(txtFormat);

        loadInfo.lineStyle(_lineH,码加resty源码分析 _lineBgcolor, );

        loadInfo.moveTo(0, _lineH/2);

        loadInfo.lineTo(percent*_lineLen/, _lineH/2);

        if (percent == ) {

        _root.play();

        delete this.onEnterFrame;

        loadInfo.clear();

        loadInfo.txt.text = "";

        }

       }

       

本文地址:http://50.net.cn/news/46a664193312.html 欢迎转发