精品国产午夜肉伦伦影院_亚洲精品国产成人_亚洲AV无码成人精品区在线播放_日韩欧美中文在线_精99久中文字幕人妻

首頁 >熱點 >

如何用Flash做進(jìn)度條_","titletext":"如何用Flash做進(jìn)度條

時間:2023-06-17 17:47:23     來源: 互聯(lián)網(wǎng)


(相關(guān)資料圖)

想必現(xiàn)在有很多小伙伴對于如何用Flash做進(jìn)度條 ","title_text":"如何用Flash做進(jìn)度條方面的知識都比較想要了解,那么今天小好小編就為大家收集了一些關(guān)于如何用Flash做進(jìn)度條 ","title_text":"如何用Flash做進(jìn)度條方面的知識分享給大家,希望大家會喜歡哦。var myLoading:MovieClip; var loadInfo:MovieClip;var _lineBgcolor = "0x666666"; var _lineColor = "0x0000FF"; var _lineLen:Number = 200; var _lineH:Number = 3; var _txtColor; var _txtAlign:String = "center"; var tb:Number; var txtFormat:TextFormat = new TextFormat("Arial", null, 0x000000, true); myLoading = _root.createEmptyMovieClip("myLoading",10); //進(jìn)度條loadInfo = myLoading.createEmptyMovieClip("line", 10); loadInfo.lineStyle(1, _lineColor, 20);loadInfo.moveTo(0, 0);loadInfo.lineTo(_lineLen, 0); loadInfo.lineTo(_lineLen, _lineH); loadInfo.lineTo(0, _lineH); loadInfo.lineTo(0, 0); //進(jìn)度顯示文本loadInfo.createTextField("txt", 30, 0, 0, _lineLen, 22);loadInfo.txt.autoSize = _txtAlign; //設(shè)置進(jìn)度條的位置(居中于主場景)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*100);loadInfo.txt.text = percent+"%"; loadInfo.txt.setTextFormat(txtFormat); loadInfo.lineStyle(_lineH, _lineBgcolor, 10); loadInfo.moveTo(0, _lineH/2); loadInfo.lineTo(percent*_lineLen/100, _lineH/2); if (percent == 100) { _root.play(); delete this.onEnterFrame; loadInfo.clear(); loadInfo.txt.text = "";** ** 把這段代碼放在第一層第一幀??梢燥@示最簡單的FLASH進(jìn)度條。

本文到此結(jié)束,希望對大家有所幫助。

免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!

標(biāo)簽:

頭條精選