TextMate JavaScript Flash Bundle
July 31st, 2008
I’ve quickly put together a bundle for working with JSFL, or the Flash JavaScript API. If you’re not familiar with JSFL it is used to automate and extend the Flash IDE. The bundles language grammar relies on the JavaScript bundle being installed (which is one of TextMates default bundles) as it extends it and adds all of the JSFL objects, methods and properties. You also get:
Run (⌘R)
Runs the current document in Flash.
Documentation (⌃H)
Searches the documentation and presents a list of matches. As I only have access to machines with Flash CS3 installed I don’t know the alternative paths to the documentation previous (and later) versions of Flash use so please drop me a line and I’ll include them.
Auto Complete Method / Property (⌥⎋)
Provides a pop-up list of the available method and property completions based on the current word.
I’d recommend checking out the bundle from here for the most up to date version, otherwise you can download it as a zip here.

Travis Says:
August 13th, 2008 at 5:50 am
Hi, Thanks for the great bundle of actionscript 3.
But I got a prob of the last svn version:
var aaa:AAA=find: /.fseventsd: Permission denied find: /.Spotlight-V100: Permission denied find: /.Trashes: Permission denied find: /private/tmp/launchd-18.t98iTh: Permission denied find: /private/var/agentx: Permission denied find: /private/var/at/tabs: Permission denied find: /private/var/at/tmp: Permission denied find: /private/var/backups: Permission denied find: /private/var/db/dhcpclient: Permission denied find: /private/var/db/DirectoryService: Permission denied find: /private/var/db/krb5kdc: Permission denied find: /private/var/db/shadow: Permission denied find: /private/var/db/sudo: Permission denied find: /private/var/log/krb5kdc: Permission denied find: /private/var/root: Permission denied find: /private/var/run/mds: Permission denied find: /private/var/samba/winbindd_privileged: Permission denied find: /private/var/spool/cups: Permission denied find: /private/var/spool/fax: Permission denied find: /private/var/spool/mqueue: Permission denied find: /private/var/tmp/launchd: Permission denied find: /System/Library/User Template: Permission denied
new AAA();
look, i var aaa then new+tab I got the list of “find” but it works “new AAA()”
and prob 2: When “import+tab” I can only see the default list like “flash.events…..”, never my com.iLouYou….. or some other as3lib do I need add some shell vars to TM?
and prob 3: when cmd+b it complies the as to swf, but I should open the swf myself, is there a auto-open setting?
Thank you again! You did really great!
Simon Says:
August 13th, 2008 at 11:57 am
@Travis
1 – Looking at the find error output I think you’re using a scratch project which is something I’d not catered for. I’ll add the problem to my issue list and fix it soon.
2 – You need to use the alt-esc autocomplete key sequence.
3 – If you look in ActionScript 3.tmbundle > Templates > Project > compile.sh there is an example of how to open a file after successful compilation. I won’t be adding it as a default to the build command as build is a separate activity to run.
Travis Says:
August 15th, 2008 at 7:14 am
Thanks, Simon. To the point 2, I mean how can I add a source folder(like PV3D or as3Lib) to the project that TM can add the classes in the folder auto.
And I use alt-esc after “import”, wow:
/Volumes/iSoft/Program/TextMate.app/Contents/SharedSupport/Support/lib/textmate.rb:107:in /bin/bash: -c: line 0: unexpected EOF while looking for matching
'' /bin/bash: -c: line 2: syntax error: unexpected end of fileentries' from /Volumes/iSoft/Program/TextMate.app/Contents/SharedSupport/Support/lib/textmate.rb:107:in /bin/bash: -c: line 0: unexpected EOF while looking for matching” /bin/bash: -c: line 2: syntax error: unexpected end of filescandir’ from /Volumes/iSoft/Program/TextMate.app/Contents/SharedSupport/Support/lib/textmate.rb:107:in /bin/bash: -c: line 0: unexpected EOF while looking for matching'' /bin/bash: -c: line 2: syntax error: unexpected end of filescan_dir' from /Volumes/iSoft/Program/TextMate.app/Contents/SharedSupport/Support/lib/textmate.rb:112:in /bin/bash: -c: line 0: unexpected EOF while looking for matching” /bin/bash: -c: line 2: syntax error: unexpected end of fileeach’ from /Volumes/iSoft/Program/TextMate.app/Contents/SharedSupport/Support/lib/textmate.rb:107:in /bin/bash: -c: line 0: unexpected EOF while looking for matching `” /bin/bash: -c: line 2: syntax error: unexpected end of fileeachtext_file’from /Users/Travis/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/package_completion.rb:38:in
Simon Says:
August 24th, 2008 at 10:13 am
@Travis
The bundles designed to assume that directories named source, lib, src and test contain source code. For example in the project I’m currently working on my Papervision source is stored here:
${TMPROJECTDIRECTORY}/lib/src/Papervision3D/srcI’m not sure what’s happening with your import problem. Do you have any other details? Does it happen all the time? Are you using a ‘cutting edge’ version of TextMate – see Preferences > Software Update.
Ali Says:
October 3rd, 2008 at 10:58 am
Hi Simon, thanks for the great bundle. Everything is working great but the index.html won’t open when the compile has completed. It’s set to do so in the compile.sh file like this:
if [ "$?" == "0" ] then open “deploy/index.html”; fi
If you can advise at all it would be much apppreciated. Thanks!