Are you looking to speed up your coding in AS3 when you are working in Flash environment? Here is a list of hotkeys that you can use in your actions Panel or with external .as files. Just hit the [Esc] key and then individually hit the two keys listed after and Flash will spit out a snippet of code for you.
If you want to add your own Flash Quickeys go into the ActionsPanel.xml file and add a quickey. For example if I wanted to create a pacakage that contained a class and a constructor then I could create my own quickey to do all of that. or if I just wanted to create a package then I would add id =”package” quickey=”pk” to the line that starts <string name=”package” in a similar fashion as the rest of the line with quickeys.
Flash ActionScript3 HotKeys
| AS3 output | Quickey |
| trace ( ); | [Esc – tr] |
| break( ); | [Esc – br] |
| case condition : | [Esc – ce] |
| continue; | [Esc -co] |
| default : | [Esc -dt] |
| do { } while ( ); | [Esc-do] |
| } else { | [Esc -el] |
| for ( ) { } | [Esc -fr] |
| for ( ) { } | [Esc -fi] |
| if ( ) { } | [Esc -if] |
| return ( ); | [Esc -rt] |
| switch ( ) { } | [Esc -sw] |
| throw ; | [Esc -th] |
| try { } | [Esc – ty] |
| catch ( ) | [Esc -ch] |
| finally { } | [Esc -fy] |
| ” “ | [Esc -ev] |
| while ( ) { } | [Esc -wh] |
| with ( ) { } | [Esc -wt] |
| class { } | [Esc -cl] |
| function ( ) { } | [Esc -fn] |
| var ; | [Esc -vr] |
| // | [Esc -//] |
As always happy Flashing
Curtis J. Morley
P.S. Here is the code I used to grab all of the quickeys from the ActionsPanel.xml file. I love E4X.
var quickeyXML:XML = {I pasted the XML from ActionsPanel.xml here}
for each (var element:XML in quickeyXML..@quickey)
{
trace(“[Esc – “+element+”]”);
}