MovieClip.prototype.loadMovieClip = function(src:String, onComplete:Function) :MovieClip { var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener({onLoadInit:onComplete}); mcLoader.loadClip(src,this); return this; };
使用方式:
var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth()); container._x = container._y = 0; container.visible = false; container.loadMovieClip("vodBlock.swf", function(container:MovieClip) { trace("load complete"); container._visible = false; });
參考來源:
Flash CS4 Professional ActionScript 2.0: loadClip (MovieClipLoader.loadClip 方法)
沒有留言:
張貼留言
你好!歡迎你在我的 Blog 上留下你寶貴的意見。