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)
All right you Flashers. Stop banging your heads because of the latest Flash Error and go spend a little time with Matt Maxwell. Matt understands your pain and even sings about it. Once you hear Matt's lucid tomes you will be blown away at how well he understands your pain.
ActionScript Error #1188: Illegal assignment to class Boolean.
ActionScript Error #1188: Illegal assignment to class Number.
ActionScript Error #1188: Illegal assignment to class int.
ActionScript Error #1188: Illegal assignment to class uint.
ActionScript Error #1188: Illegal assignment to class String.
ActionScript Error #1188: Illegal assignment to class Array.
ActionScript Error #1188: Illegal assignment to class Object.
ActionScript 3 Error #1188 Description:
AS3 error 1188 is thrown when the keyword "var" is omitted. Adobe doesn't offer any documentation on this ActionScript Error and the description itself is no help at all. This error will be thrown whenever the "var" keyword is missing on all variable assignments including a custom Class/Data Type. I have never experienced this error without also getting AS3 Error 1067 first.
Flex / Flash Error 1188 Fix:
Don't forget the var when you define a new variable.
Bad Code:
import com.errors.CustomObj myCustomObj:CustomObj = new CustomObj(); myObj:Object = new Object(); myBool:Boolean = false; myint:int = -1; myString:String = "Happy Flashing"; myArray:Array = new Array();
Good Code:
import com.errors.CustomObj var myCustomObj:CustomObj = new CustomObj(); var myObj:Object = new Object(); var myBool:Boolean = false; var myint:int = -1; var myString:String = "Happy Flashing"; var myArray:Array = new Array();