📄 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 + -