flex 代码提示
代码提示的快捷键: 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 "<Left>") { } " />
<codehint pattern="on (keyPress "<Right>") { } " />
<codehint pattern="on (keyPress "<Home>") { } " />
<codehint pattern="on (keyPress "<End>") { } " />
<codehint pattern="on (keyPress "<Insert>") { } " />
<codehint pattern="on (keyPress "<Delete>") { } " />
<codehint pattern="on (keyPress "<Backspace>") { } " />
<codehint pattern="on (keyPress "<Enter>") { } " />
<codehint pattern="on (keyPress "<Up>") { } " />
<codehint pattern="on (keyPress "<Down>") { } " />
<codehint pattern="on (keyPress "<ageUp>") { } " />
<codehint pattern="on (keyPress "<ageDown>") { } " />
<codehint pattern="on (keyPress "<Tab>") { } " />
<codehint pattern="on (keyPress "<Escape>") { } " />
<codehint pattern="on (keyPress "<Space>") { } " />
<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还是有好多不完善的,例如自己写的类在引用后,就不能得到代码提示,这点就不如微软的开发工具好!