I discovered last week when teaching my Flash class that in saving FLAs to my USB drive, and THEN testing/publishing, the AS3 code was ignored in the resulting SWF?EXE files. I duplicated the situation with multiple computers, mutliple external drives and multiple FLA files. I even tried it at differnt locations (home and campus). The problem is only related to CS4 with Actionscipt 3. Both CS3/AS3 and CS4/AS2 test/compile as one would expect. Save the CS4/AS3 file to the internal C: drive and then test/publish everything works fine. Go figure! WHy would the save location make any difference? I thought perhaps it was a PATH environment variable issue, but putting the external drive path in the PATH statement caused no effect.
Here's the information I'm providing to my class tonight. Anyone else encountering the same? BTW, I upgraded to release 10.0.2 but to no avail.
I think I discovered a pretty major bug in Flash CS4. When creating an ActionScript 3 file (with scripts written on the timeline) and saving the FLA source to an external drive (such as a USB thumb drive) and then testing (Control > Test Movie) or publishing (File > Publish), the AS3 code is ignored in the resulting SWF or EXE. If you save the file to the C: drive and then test/publish, it works fine. I tried this on several computers with several different FLA files and differing script, with several devices including a network drive – all with the same result.
I posted the problem to the ActionScript forum at adobe.com and contacted tech support (via email) but have yet to receive any useful feedback.
OPTION 1: Save your FLA to the hard drive before testing. You can create a temporary folder on the desktop of the campus computers or should have access to C:\TEMP. So save your files there and at the end of you session, be sure to copy the files (both the FLA and any published files) to your USB for safekeeping. When updating your FLA, first copy it to the internal C: hard drive, then make changes and test, etc.
OPTION 2: AS3 code written to an external .AS file does work when compiled. But this really is beyond the scope of this class and adds a lot of complexity.
OPTION 3: Use Flash CS3 – works fine in CS3, but of course you can’t use any of the cool new CS4 features such as new motion tweening, and inverse kinematics (IK bone structures).