describeType分析解读 之DisplayObject_陕南赤子_新浪博客



trace(describeType(DisplayObject));

//这一段表示了这个类叫什么名字,路径是什么,是否是动态类,是否是不可扩展类等等
<type name="flash.display::DisplayObject" base="Class" isDynamic="true" isFinal="true" isStatic="true">
<extendsClass type="Class"/>
<extendsClass type="Object"/>
<accessor name="prototype" access="readonly" type="*" declaredBy="Class"/>
<factory type="flash.display::DisplayObject">
    <metadata name="Event">
      <arg key="name" value="render"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="removedFromStage"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="removed"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="enterFrame"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="deactivate"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="addedToStage"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="added"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
    <metadata name="Event">
      <arg key="name" value="activate"/>
      <arg key="type" value="flash.events.Event"/>
    </metadata>
   
    //这两段表示了他继承了谁,他继承的类又继承了谁,直到Object始祖,才没有了..
    <extendsClass type="flash.events::EventDispatcher"/>
    <extendsClass type="Object"/>
   
    //这两段表示了他实现了这两个接口
    <implementsInterface type="flash.events::IEventDispatcher"/>
    <implementsInterface type="flash.display::IBitmapDrawable"/>
   
   
    <accessor name="x" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="y" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="blendMode" access="readwrite" type="String" declaredBy="flash.display::DisplayObject"/>
    <accessor name="scale9Grid" access="readwrite" type="flash.geom::Rectangle" declaredBy="flash.display::DisplayObject"/>
    <accessor name="alpha" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="name" access="readwrite" type="String" declaredBy="flash.display::DisplayObject"/>
    <accessor name="rotation" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="scrollRect" access="readwrite" type="flash.geom::Rectangle" declaredBy="flash.display::DisplayObject"/>
    <accessor name="cacheAsBitmap" access="readwrite" type="Boolean" declaredBy="flash.display::DisplayObject"/>
    <accessor name="accessibilityProperties" access="readwrite" type="flash.accessibility::AccessibilityProperties" declaredBy="flash.display::DisplayObject"/>
    <method name="globalToLocal" declaredBy="flash.display::DisplayObject" returnType="flash.geom::Point">
      <parameter index="1" type="flash.geom::Point" optional="false"/>
    </method>
    <accessor name="scaleX" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="visible" access="readwrite" type="Boolean" declaredBy="flash.display::DisplayObject"/>
    <method name="getBounds" declaredBy="flash.display::DisplayObject" returnType="flash.geom::Rectangle">
      <parameter index="1" type="flash.display::DisplayObject" optional="false"/>
    </method>
    <accessor name="width" access="readwrite" type="Number" declaredBy="flash.display::DisplayObject"/>
    <accessor name="opaqueBackground" access="readwrite" type="Object" declaredBy="flash.display::DisplayObject"/>
    <method name="hitTestPoint" declaredBy="flash.display::DisplayObject" returnType="Boolean">
      <parameter index="1" type="Number" optional="false"/>
      <parameter index="2" type="Number" optional="false"/>
      <parameter index="3" type="Boolean" optional="true"/>
    </method>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值