MovieClip.prototype.smoothImageLoad = function(img) { var listener = new MovieClipLoader(); listener.onLoadComplete = function(mc:MovieClip) { mc.onEnterFrame = function() { bitmap = new flash.display.BitmapData(this._width, this._height); bitmap.draw(this); this.attachBitmap(bitmap, 1, "auto", true); this.smoothImageLoadComplete(); } }; listener.loadClip(img, this); }; this.createEmptyMovieClip("mc", 0); mc.smoothImageLoad("doggy.jpg"); mc._xscale = mc._yscale=400; //把圖片放大4倍 |