Speed up your Flash Coding

Most computer literate people understand the value of keyboard shortcuts to improve efficiency and time. Who wants to go to File - >Edit -> Undo when they can just press Ctrl+Z. Well in Flash (and I believe Flex for that matter) you can increase your efficiency even more by using the 'escape shortcuts keys' (different from the keyboard shortcuts that initiate certain menu commands). Most of us have seen this in the actions panel next to elements inside the actions panel. (as seen highlighted in yellow below)

Screen shot of elements in the Actions Panel

If you don't see these in your actions panel, you can turn this feature on by going to the View Options pop-up menu, and enable or disable View Escape Shortcut Keys. (as seen highlighted in yellow below)

Screen shot of View Options menu in the Actions Panel

To use these shortcuts while coding in the Actions panel, you can press 'Esc' and combination of two keys in sequence (not all at the same time) to insert ActionScript code blocks into the ActionScript window.

For example, if you are working in the actions panel and type Esc+f+n, the following code is placed in your script, with the cursor placed immediately following 'function' to allow you to give your function a name:

function () {
}

This can be a huge time saver if you get in the habit of using these shortcuts. One of the problems however is remembering them all, as I have not found them documented anywhere. So I have provided a complete (as far as I know) list below of all the current escape shortcut keys (I have not included shortcuts for deprecated code). You can also grab a 'PDF version' or 'FlashPaper version' as well. The downloadable/printable versions include descriptions as well (not enough real estate here :) ) Feel free to let me know if I have missed any and I will add them in.

Enjoy!

Element Quickkey
gotoAndPlay Esc - g - p
gotoAndStop Esc - g - s
nextFrame Esc - n - f
prevFrame Esc - p - f
nextScene Esc - n - s
prevScene Esc - p - s
play Esc - p - l
stop Esc - s - t
stopAllSounds Esc - s - s
getURL Esc - g - u
loadMovie Esc - l - m
loadMovieNum Esc - l - n
loadVariables Esc - l - v
loadVariablesNum Esc - v - n
unloadMovie Esc - u - m
unloadMovieNum Esc - u - n
fscommand Esc - f - s
onClipEvent Esc - o - c
on Esc - o - n
setProperty Esc - s - p
duplicateMovieClip Esc - d - m
removeMovieClip Esc - r - m
startDrag Esc - d - r
stopDrag Esc - s - d
print Esc - p - r
printAsBitmap Esc - p - b
printNum Esc - p - n
printAsBitmapNum Esc - b - n
trace Esc - t - r
set variable Esc - s - v
with Esc - w - t
delete Esc - d - e
var Esc - v - r
if Esc - i - f
else Esc - e - l
else if Esc - e - i
while Esc - w - h
do while Esc - d - o
for Esc - f - r
for..in Esc - f - i
break Esc - b - r
continue Esc - c - o
class Esc - c - l
interface Esc - i - t
import Esc - i - p
function Esc - f - n
return Esc - r - t
switch Esc - s - w
case Esc - c - e
default Esc - d - t
try Esc - t - y
catch Esc - c - h
finally Esc - f - y
throw Esc - t - h
#initclip Esc - i - c
#endinitclip Esc - e - c
#include Esc - i - n

/** UPDATE **/
See the post titled "Adding Custom Actions and Escape Keys" for more information on this topic.

8 Responses to “Speed up your Flash Coding”

  1. Marcos Medina Says:

    Great!!! Thank you. I was looking for this…
    And thanks for the pdf and the swf printable versions.

    :-)

  2. bhupendra mandal Says:

    great work

  3. Step Schwarz Says:

    Whoa. How have I managed to miss Esc shortcuts all this time..? Great find and thanks for the PDF.

  4. Mike Says:

    Out of curiosity, do you know if there is a way to edit these Esc commands so that you could customize the key combo that triggers each insert of code? Like, for instance, if I wanted Esc+1 to throw a stop(); down.

  5. Mike Says:

    And I see the next part, now… Nice. =P

  6. Just Another Rant » Blog Archive » Adding Custom Actions and Escape Keys Says:

    [...] As an extension to my previous post regarding Escape Shortcut Keys in Flash, below is a way to add/modify your own, along with a nice set graciously provided by atn at SoleilNoir There’s also a trick to improve the way you use these “quickeys” by editing the ActionsPanel.xml file and personalizing it. • Find it at C: Program Files\Macromedia\Flash {version} \{LANGUAGE}\First Run\ActionsPanel [...]

  7. Just Another Rant » Blog Archive » Esc Shortcuts still work in Flash CS3 Says:

    [...] gotten a few emails from people asking about getting the Escape Shortcuts to work in CS3, and specifically if they still work in AS3. The answer is absolutely, although they [...]

  8. CreditExpert Says:

    This is much useful information. Thank you a lot! You are right, it’s funny to find special lines of command instead of pushing few buttons. Silly, isn’t it? Good for you!

Leave a Reply


Visit Portfolio :

Crucial Limit

Client List :

Aces Tattoos | 82 Tattoo | Eric Peacock | Kustom Tattooz | Laser Imaging & Design | Laterras R. Whitfield | Solipsum | Travelocity ExperienceFinder {beta} | Travelocity | ZSI

Socialize:

Flickr | View Dave Gillem's LinkedIn profileView my LinkedIn profile | Twitter | Facebook | Become a fan of Crucial Limit on Facebook Become a fan on Facebook

Add to: