flex 代码提示

感觉代码提示还不够智能,好多action script的提示都没有。
代码提示的快捷键: Alt + /


附:flash代码提示规则
============================================================================================================

在Flash安装目录中有一个XML文件,内容如下:

<codehints>

  <codehint pattern="on (press) { } " />

  <codehint pattern="on (release) { } " />

  <codehint pattern="on (releaseOutside) { } " />

  <codehint pattern="on (rollOver) { } " />

  <codehint pattern="on (rollOut) { } " />

  <codehint pattern="on (dragOver) { } " />

  <codehint pattern="on (dragOut) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Left&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Right&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Home&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;End&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Insert&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Delete&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Backspace&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Enter&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Up&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Down&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&ltageUp&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&ltageDown&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Tab&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Escape&gt;&quot;) { } " />

  <codehint pattern="on (keyPress &quot;&lt;Space&gt;&quot;) { } " />

  <codehint pattern="onClipEvent (load) { } " />

  <codehint pattern="onClipEvent (unload) { } " />

  <codehint pattern="onClipEvent (enterFrame) { } " />

  <codehint pattern="onClipEvent (mouseDown) { } " />

  <codehint pattern="onClipEvent (mouseMove) { } " />

  <codehint pattern="onClipEvent (mouseUp) { } " />

  <codehint pattern="onClipEvent (keyDown) { } " />

  <codehint pattern="onClipEvent (keyUp) { } " />

  <codehint pattern="onClipEvent (data) { } " />

  <typeinfo pattern="*_mc" object="MovieClip" />

  <typeinfo pattern="*_array" object="Array" />

  <typeinfo pattern="*_str" object="String" />

  <typeinfo pattern="*_btn" object="Button" />

  <typeinfo pattern="*_txt" object="TextField" />

  <typeinfo pattern="*_fmt" object="TextFormat" />

  <typeinfo pattern="*_date" object="Date" />

  <typeinfo pattern="*_sound" object="Sound" />

  <typeinfo pattern="*_xml" object="XML" />

  <typeinfo pattern="*_xmlnode" object="XMLNode" />

  <typeinfo pattern="*_xmlsocket" object="XMLSocket" />

  <typeinfo pattern="*_color" object="Color" />

  <typeinfo pattern="*_cm" object="ContextMenu" />

  <typeinfo pattern="*_cmi" object="ContextMenuItem" />

  <typeinfo pattern="*_pj" object="PrintJob" />

  <typeinfo pattern="*_mcl" object="MovieClipLoader" />

  <typeinfo pattern="*_err" object="Error" />

  <typeinfo pattern="*_cam" object="Camera"/>

  <typeinfo pattern="*_lv" object="LoadVars" />

  <typeinfo pattern="*_lc" object="LocalConnection"/>

  <typeinfo pattern="*_mic" object="Microphone"/>

  <typeinfo pattern="*_nc" object="NetConnection"/>

  <typeinfo pattern="*_ns" object="NetStream"/>

  <typeinfo pattern="*_so" object="SharedObject"/>

  <typeinfo pattern="*_video" object="Video"/>

  <typeinfo pattern="_level*" object="MovieClip" />

  <typeinfo pattern="_parent" object="MovieClip" />

  <typeinfo pattern="_root" object="MovieClip" />

</codehints>

fficeffice" />

大家仔细看节点typeinfo 里面的内容,例如pattern="*_txt"是后缀 object="TextField"是类型。那么在Flash环境中建立一个文本框,它的实例名为text_txt。这个时候在动作面板中你将得到关于文本框的代码提示。 

或者在建立变量的时候指名变量类型,也可以得到代码提示,如:private var text_txt:TextField; 

当然MM还是有好多不完善的,例如自己写的类在引用后,就不能得到代码提示,这点就不如微软的开发工具好!



posted @ 2007-11-02 13:43  zhangsir  阅读(1074)  评论(0编辑  收藏  举报