博文

同步加载多个外部swf的方法(2006-07-30 22:44:00)

摘要:在 2006,且行且惜-Fdream's Blog上有更多精彩 连接:  http://www.afdream.com/blog/blogview.asp?logID=12 下面是加载多个 swf 的代码:function manyLoadMovie(num, x, y, xscal, yscal, dis) {for (var i = 0; i<num; i++) {var Temp = createEmptyMovieClip("temp"+i, i);var L = createEmptyMovieClip("load"+i, i+num);Temp.t = i;L.loadMovie(i+".swf");L._xscale = xscal;L._yscale = yscal;L._x = x+i*dis;L._y = y;T = createTextField("txt"+i, i+10000, L._x, L._y, 100, 100);Temp.onEnterFrame = function() {var a = this._parent["load"+this.t].getBytesLoaded();var b = this._parent["load"+this.t].getBytesTotal();this._parent["txt"+this.t].text = int(a*100/b)+"%";if (a>=b and a>10) {this._parent["txt"+this.t].removeTextField();this.removeMovieClip(......

阅读全文(10813) | 评论:0