How to compile AS3 in Flash from Flex Builder (or anywhere on Mac)

To achieve this simple task I use a bit of applescript hocus pocus and Quicksilver.
Quicksilver isn’t necessary, it’s just nice to compile from Flex using “command+return”…

The Applescript

  • Launch Script Editor
  • Use the following code:

tell application “Adobe Flash CS3″ to activate

tell application “System Events”

tell process “Flash”

tell menu bar 1

tell menu “Control”

click menu item “Test Movie”

end tell

end tell

end tell

end tell

(please note: you will have to replace the ” by regular “… a straight copy paste will make funky double quotes…)

You should end up with something like this:

step1

  • Save the file as a script somewhere
  • Save the file as an application in your user folder (~/Applications), make that one run only.
  • Try run that applescript application with Flash open.

In Quicksilver (optional)

step2

  • Open Triggers
  • Create a new HotKey
  • Type in your applescript application filename

    step3

    step4

  • Assign a shortcut to it.
  • Optionally, assign a scope to it (so it only works from your editor)

    step5

All done.

Cheers.

Related



About this entry