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 方法)
0 回應:
張貼留言