[AS3]TypeDescriptor-Flash类对象(或变量)的遍历器
【组件版本】:0.2
【功能简述】:对变量或类对象的遍历,提供类似于帮助文件那样的文本信息。
【运行平台】:Flash CS3,ActionScript3,Flash Player 9 +
【类路径】:com.klstudio.util.TypeDescriptor
【方法说明】:public static function describeTypeAll(target:*):String
【调用实例】:
- import com.klstudio.util.TypeDescriptor;
- import flash.display.Sprite;
- var sprite:Sprite = new Sprite();
- trace(TypeDescriptor.describeTypeAll(sprite));
- trace(TypeDescriptor.describeTypeAll(Sprite));
【运行结果】:
两个方法运行 显示的结果都是如下内容;
- [Package] flash.display
- [Class] Sprite
- [Inheritance] flash.display.DisplayObjectContainer -> flash.display.InteractiveObject -> flash.display.DisplayObject -> flash.events.EventDispatcher -> Object
- [Implements] flash.events.IEventDispatcher,flash.display.IBitmapDrawable
- [Properties]
- buttonMode:Boolean [readwrite]
- graphics:flash.display.Graphics [readonly]
- useHandCursor:Boolean [readwrite]
- soundTransform:flash.media.SoundTransform [readwrite]
- dropTarget:flash.display.DisplayObject [readonly]
- hitArea:flash.display.Sprite [readwrite]
- textSnapshot:flash.text.TextSnapshot [readonly]
- mouseChildren:Boolean [readwrite]
- numChildren:int [readonly]
- tabChildren:Boolean [readwrite]
- tabEnabled:Boolean [readwrite]
- doubleClickEnabled:Boolean [readwrite]
- contextMenu:flash.ui.ContextMenu [readwrite]
- accessibilityImplementation:flash.accessibility.AccessibilityImplementation [readwrite]
- mouseEnabled:Boolean [readwrite]
- focusRect:Object [readwrite]
- tabIndex:int [readwrite]
- x:Number [readwrite]
- y:Number [readwrite]
- blendMode:String [readwrite]
- scale9Grid:flash.geom.Rectangle [readwrite]
- alpha:Number [readwrite]
- name:String [readwrite]
- rotation:Number [readwrite]
- scrollRect:flash.geom.Rectangle [readwrite]
- cacheAsBitmap:Boolean [readwrite]
- accessibilityProperties:flash.accessibility.AccessibilityProperties [readwrite]
- scaleX:Number [readwrite]
- visible:Boolean [readwrite]
- width:Number [readwrite]
- opaqueBackground:Object [readwrite]
- height:Number [readwrite]
- scaleY:Number [readwrite]
- mouseX:Number [readonly]
- mask:flash.display.DisplayObject [readwrite]
- parent:flash.display.DisplayObjectContainer [readonly]
- mouseY:Number [readonly]
- loaderInfo:flash.display.LoaderInfo [readonly]
- transform:flash.geom.Transform [readwrite]
- root:flash.display.DisplayObject [readonly]
- stage:flash.display.Stage [readonly]
- filters:Array [readwrite]
- [Methods]
- startDrag(param0:Boolean[optional],param1:flash.geom.Rectangle[optional]):void
- stopDrag():void
- addChild(param0:flash.display.DisplayObject):flash.display.DisplayObject
- swapChildren(param0:flash.display.DisplayObject,param1:flash.display.DisplayObject):void
- getChildByName(param0:String):flash.display.DisplayObject
- getObjectsUnderPoint(param0:flash.geom.Point):Array
- removeChildAt(param0:int):flash.display.DisplayObject
- getChildIndex(param0:flash.display.DisplayObject):int
- areInaccessibleObjectsUnderPoint(param0:flash.geom.Point):Boolean
- removeChild(param0:flash.display.DisplayObject):flash.display.DisplayObject
- setChildIndex(param0:flash.display.DisplayObject,param1:int):void
- addChildAt(param0:flash.display.DisplayObject,param1:int):flash.display.DisplayObject
- swapChildrenAt(param0:int,param1:int):void
- contains(param0:flash.display.DisplayObject):Boolean
- getChildAt(param0:int):flash.display.DisplayObject
- globalToLocal(param0:flash.geom.Point):flash.geom.Point
- getBounds(param0:flash.display.DisplayObject):flash.geom.Rectangle
- hitTestPoint(param0:Number,param1:Number,param2:Boolean[optional]):Boolean
- getRect(param0:flash.display.DisplayObject):flash.geom.Rectangle
- hitTestObject(param0:flash.display.DisplayObject):Boolean
- localToGlobal(param0:flash.geom.Point):flash.geom.Point
- hasEventListener(param0:String):Boolean
- toString():String
- willTrigger(param0:String):Boolean
- removeEventListener(param0:String,param1:Function,param2:Boolean[optional]):void
- addEventListener(param0:String,param1:Function,param2:Boolean[optional],param3:int[optional],param4:Boolean[optional]):void
- dispatchEvent(param0:flash.events.Event):Boolean
【组件下载】:http://www.klstudio.com/demo/mxp/TypeDescriptor.mxp