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+”]”);
}
This doesn’t work… at least in OSX/CS3
works in a new as2 file, DOESNT work in a new as3 file
wish it did 🙁
Holy Crap! I am always amazed by how much I learn from your tips (you seem to be the only one besides myself that hits those strange AS errors…) but this is AMAZING!! Its’ something that I’ve been envious of from MS in VS for ages. Little did I know it was there! Keep up the amazing work! And as another fellow Utahn, howdy from Weber State!
Hi Curtis.
Since we have a reading assignment for the weekend (CH 5) would it be ok for me to get my text book from you? If it’s ok please let me know.
Thanks!
Pingback: links for 2008-09-04 | NeXt
No problem Kelly. Glad that these will help.
Ah, this is going to same so much time! Thanks for posting these.