⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fuicomponentsclass.as

📁 flashget43的源代码 一个比较常用的下载程序
💻 AS
📖 第 1 页 / 共 2 页
字号:
#initclip 0/*=============  FUIComponentClass     The base class for all FUI controls in flash6.   ==============*/function FUIComponentClass(){	this.init();}FUIComponentClass.prototype = new MovieClip();FUIComponentClass.prototype.DEFAULT_SKIN = _global.FlashChatNS.DefaultSkin;FUIComponentClass.prototype.BTN_TYPE_NORMAL   = 0;FUIComponentClass.prototype.BTN_TYPE_CLOSE    = 1;FUIComponentClass.prototype.BTN_TYPE_MINIMIZE = 2;FUIComponentClass.prototype.BTN_TYPE_HIDE     = 3;FUIComponentClass.prototype.BTN_TYPE_WFREEZE  = 4;FUIComponentClass.prototype.BTN_TYPE_HFREEZE  = 5;FUIComponentClass.prototype.BTN_TYPE_COMBO    = 6;FUIComponentClass.prototype.BTN_TYPE_SCROLL   = 7;FUIComponentClass.prototype.BTN_TYPE_SCROLL_LOW = 8;FUIComponentClass.prototype.BTN_TYPE_SCROLL_HI  = 9;FUIComponentClass.prototype.BG_TYPE_COMBO     = 10;FUIComponentClass.prototype.BG_TYPE_SCROLL    = 11;FUIComponentClass.prototype.BG_TYPE_RECT      = 12;FUIComponentClass.prototype.STATE_OUT      = 'out';FUIComponentClass.prototype.STATE_OVER     = 'over';FUIComponentClass.prototype.STATE_PRESS    = 'press';FUIComponentClass.prototype.STATE_DISABLED = 'disabled';//skin tableFUIComponentClass.prototype.SKIN_TABLE = { 	default_skin  : 1,	xp_skin       : 2,	gradient_skin : 3,	aqua_skin     : 4}; FUIComponentClass.prototype.init = function(){	//set default skin	if(_global.FlashChatNS.SKIN_NAME == undefined)		_global.FlashChatNS.SKIN_NAME = this.DEFAULT_SKIN;	//register object in global array	if (_global.FlashChatNS.components_arr == undefined) 	{ 		_global.FlashChatNS.components_arr = new Array();		_global.FlashChatNS.skin_table = this.SKIN_TABLE;	}	_global.FlashChatNS.components_arr.push(this);		this.initSkinVars();		this.type = '';	this.enable = true;	this.focused = false;	this.useHandCursor = false;	//accessibility :: hide non accessible components from screen reader	this._accImpl = new Object();	this._accImpl.stub = true;	this.styleTable = new Array();	if (_global.globalStyleFormat==undefined) {		_global.globalStyleFormat = new FStyleFormat();		globalStyleFormat.isGlobal = true;		_global._focusControl = new Object();		_global._focusControl.onSetFocus = function(oldFocus, newFocus)		{			oldFocus.myOnKillFocus();			newFocus.myOnSetFocus();		}		Selection.addListener(_global._focusControl);	}	if (this._name!=undefined) {		this._focusrect = false;		this.tabEnabled = true;		this.focusEnabled = true;		this.tabChildren = false;		this.tabFocused = true;		if (this.hostStyle==undefined) {			globalStyleFormat.addListener(this);		} else { 			this.styleTable = this.hostStyle;		}				this.deadPreview._visible = false;		this.deadPreview._width = this.deadPreview._height = 1;		this.methodTable = new Object();				this.keyListener = new Object();		this.keyListener.controller = this;		this.keyListener.onKeyDown = function()		{			this.controller.myOnKeyDown();		}		this.keyListener.onKeyUp = function()		{			this.controller.myOnKeyUp();		}		for (var i in this.styleFormat_prm) {			this.setStyleProperty(i, this.styleFormat_prm[i]);		}	}}// ::: PUBLIC METHODSFUIComponentClass.prototype.initSkinVars = function(){	this._face        = "face";	this._face_press  = "face_press";	this._highlight   = "highlight";	this._highlight3D = "highlight3D";	this._shadow      = "shadow";	this._darkshadow  = "darkshadow";	//color of "X" end "_" symbols	this._arrow       = "arrowClose";	this._arrow_xp    = "arrowClose";	this._arrow_gradient  = "arrowClose";	//gradient	this._scroll_arrow  = "arrow";	this._scroll_face   = "scrollFace";	this._scroll_border = "scrollBorder";	this._scroll_face_press = "scrollFacePress";	this._scroll_track = "scrollTrack";		this._foregroundDisabled = "arrow";	this._background = "background";	this._backgroundBorder = "backgroundBorder";	this._check = "check";		//aqua	this._base = "face";     //button	this._base2 = "highlight";  //button	this._face_aqua = "face";  //combo	this._face2 = "highlight";  //combo	this._seperator  = "face"; //tabview}FUIComponentClass.prototype.getSkinFrame = function(){		return this.SKIN_TABLE[_global.FlashChatNS.SKIN_NAME];}FUIComponentClass.prototype.getSkinName = function(){	return (_global.FlashChatNS.SKIN_NAME);}FUIComponentClass.prototype.setSkin = function(inSkin){	_global.FlashChatNS.SKIN_NAME = (inSkin == undefined)? this.DEFAULT_SKIN : inSkin;	_global.FlashChatNS.SKIN_ID   = this.getSkinFrame();	this.drawSkin();}FUIComponentClass.prototype.setSkinId = function(inSkin){	_global.FlashChatNS.SKIN_ID = this.SKIN_TABLE[inSkin];}FUIComponentClass.prototype.drawSkin = function(){	return;}FUIComponentClass.prototype.setEnabled = function(enabledFlag){	this.enable = (arguments.length>0) ? enabledFlag : true;	this.tabEnabled = this.focusEnabled = enabledFlag;	if (!this.enable && this.focused) {		Selection.setFocus(undefined);	}}FUIComponentClass.prototype.getEnabled = function(){	return this.enable;}FUIComponentClass.prototype.setSize = function(w, h){	this.width = w;	this.height = h;	this.focusRect.removeMovieClip();}FUIComponentClass.prototype.setChangeHandler = function(chng,obj){	this.handlerObj = (obj==undefined) ? this._parent : obj;	this.changeHandler = chng;}// ::: PRIVATE METHODSFUIComponentClass.prototype.invalidate = function(methodName){	this.methodTable[methodName] = true;	this.onEnterFrame = this.cleanUI;}FUIComponentClass.prototype.cleanUI = function(){		// rules of invalidation : setSize beats everyone else	if (this.methodTable.setSize) {		this.setSize(this.width, this.height);	} else {		this.cleanUINotSize();	}	this.methodTable = new Object();	delete this.onEnterFrame;}// EXTEND this method to add new invalidation rules.FUIComponentClass.prototype.cleanUINotSize = function(){	for (var funct in this.methodTable) {		this[funct]();	}}FUIComponentClass.prototype.drawRect = function(x, y, w, h){	var inner = this.styleTable.focusRectInner.value;	var outer = this.styleTable.focusRectOuter.value;	if (inner==undefined) {		inner = 0xffffff;	}	if (outer==undefined) {		outer = 0x000000;	}		this.createEmptyMovieClip( "focusRect", 1000 );//	this.focusRect._alpha = 50; // uncomment out this line if you want focus rect with alpha	this.focusRect.controller = this;	this.focusRect.lineStyle(1, outer);	this.focusRect.moveTo(x, y);	this.focusRect.lineTo(x+w, y);	this.focusRect.lineTo(x+w, y+h);	this.focusRect.lineTo(x, y+h);	this.focusRect.lineTo(x, y);	this.focusRect.lineStyle(1, inner);	this.focusRect.moveTo(x+1, y+1);	this.focusRect.lineTo(x+w-1, y+1);	this.focusRect.lineTo(x+w-1, y+h-1);	this.focusRect.lineTo(x+1, y+h-1);	this.focusRect.lineTo(x+1, y+1);}FUIComponentClass.prototype.pressFocus = function(){	this.tabFocused = false;	this.focusRect.removeMovieClip();	Selection.setFocus(this);}// OVERWRITE THIS METHOD FOR YOUR OWN RECTANGLESFUIComponentClass.prototype.drawFocusRect = function(){	this.drawRect(-2, -2, this.width+4, this.height+4);	}FUIComponentClass.prototype.myOnSetFocus = function(){	this.focused =true;	Key.addListener(this.keyListener);	if (this.tabFocused) {		this.drawFocusRect();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -