AS2 Code Hints in Adobe Flash CS3?
June 6, 2007 7:06 AM   Subscribe

Is it possible to enable AS2 syntax code hints in Flash CS3 when editing .as files?

When creating a .FLA in Flash CS3 you can choose to have the file use Actionscript2 or Actionscript3. Great. When you create a .AS external class there doesn't seem to be the ability to specify if the class is being written in AS2 or AS3. The code editor seems to assume AS3 for code hints, because, for example, if you type _root. no movieclip code hints popup as they would in previous versions of Flash which commonly used _root ( i.e. _root.createEmptyMovieClip() ). Is there a way to enable AS2 syntax code hints in Flash CS3 when editing .as files?
posted by drinkspiller to Computers & Internet (2 answers total)
 
If I were you, I'd quit writing AS in Flash's editor. I don't know any self-respecting actionscript coder who uses it. Why? Because it sucks.

If you're on a PC, I recommend SEPY (free).

If you're on a Mac, I HIGHLY recommend Textmate (cheap).

Both of those apps can be configured to highlight and hint any way you want. If you don't like the hints that come with as defaults, you can add your own.

If you keep Flash running while you're using those editors, you can use a shortcut (COMMAND+R in textmate and CONTROL+ENTER in SEPY) to test-publish in Flash. You don't even have to switch back to Flash first.

If you want a sense of who awesome Textmate is, read the chapter on text editing in the online manual. Just a few highlights:

-- CONTROL+SHIFT+D duplicates the current line, so if you're writing five lines of similar code, you can just press that shortcut and ten modify the lines.

-- OPTION+mousedrag selects a column of text. For instance I could select just the letter A's in the following text:

cat
bat
mat

-- OPTION+COMMAND+A lets you add text to the end of every line in a multi-line selection. So, for instance, if you've left semi-colons off of five lines in a row, you just select the five lines, press the shortcut, and type a semi-colon.

-- Select the word hello, type a quotation mark, and Textmate turns it into "hello". Select hello and type an open-paren, and it becomes (hello).

Textmate is one of those rare apps that have changed my life. I'm writing a book in it now.

Oh, here's someone who has ported TextMate to Windows. I haven't tried this version, so I can't comment on it.
posted by grumblebee at 9:08 AM on June 6, 2007


Best answer: I sent an inquiry to FlashGuru and true to his moniker, he had the answer:
Hi,

Yes, if you look to the left of the Actionscript editor, you will see a dropdown list from which you can choose the language you are editing.

By default Actionscipt 3 is selected, but you can select Actionscipt 1.0 and Actionscript 2.0 from the list also.

Kind Regards
Guy

I didn't see this option because the sidebar in which the dropdown lives was collapsed. I've posted a screengrab of the collapsed panel where this option is and the dropdown Guy describes.
posted by drinkspiller at 11:26 AM on June 7, 2007


« Older Do singlepage, long copy websites work?   |   Where can I find Dark Castle sound samples? Newer »
This thread is closed to new comments.