?? image.as
字號:
?#initclip 10_global.Image = function() { this.imageUrl = null; this.handlerFunctionName = null; this.handlerObj = null; this.preff_width = 0; this.preff_height = 0;};_global.Image.prototype = new MovieClip();//PUBLIC METHODS._global.Image.prototype.setHandler = function(inHandlerFunctionName, inHandlerObj) { this.handlerFunctionName = inHandlerFunctionName; this.handlerObj = inHandlerObj;};_global.Image.prototype.loadImage = function(inImageUrl) { if ((this.imageUrl == inImageUrl) && this.image_mc._visible) { return; } //this._visible = false;//(this.handlerObj != null); this.imageUrl = inImageUrl; this.image_mc.loadMovie(this.imageUrl); this.onEnterFrame = function() { if(this.image_mc.getBytesLoaded() == this.image_mc.getBytesTotal() && this.image_mc._height > 0 && this.image_mc._width > 0) { delete this.onEnterFrame; _global.FlashChatNS.preff_image_width = this.image_mc._width; _global.FlashChatNS.preff_image_height = this.image_mc._height; if(this.image_mc._width < Stage.width) this._width = Stage.width; if(this.image_mc._height < Stage.height) this._height = Stage.height; this._visible = true; this.image_mc._visible = true; } }};_global.Image.prototype.clear = function() { this.image_mc._visible = false;};//PRIVATE METHODS._global.Image.prototype.imageMCLoaded = function(inMC) { this.handlerObj[this.handlerFunctionName](this);};Object.registerClass('Image', _global.Image);#endinitclip
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -