What are some best practices and tips for editing Flash files that I didn't create?
June 11, 2006 4:16 PM   Subscribe

What are some best practices and tips for editing Flash files that I didn't create?

At my new job one of the things I'm tasked with is manipulating and editing Flash files that I didn't create. Most of these are promo or advertising pieces that aren't incredibly complex, but it's been a couple of years since I worked with Flash and I'm still getting up to speed with Flash 8.

So what's the best method for working with these files? Are there any "best practices" for reverse-engineering a FLA file to figure out how it was put together?
posted by theNonsuch to Computers & Internet (6 answers total) 3 users marked this as a favorite
It really depends on how well the source was built in the first place.

If you open the FLA and see a bunch of frames on the root timeline, that means trouble.

If you see code on frames, especially if you see any references to "_root", "_global" or "gotoAndPlay" that means trouble.

If you see old style buttons with "on press" style handlers on their instances, just shoot yourself now.

In those cases, it often cheaper and faster to scrap the old stuff entirely and start over from a sane, object oriented, code standpoint than to maintain and support horrible spagetti code made by designer-monkies.
posted by Riemann at 5:11 PM on June 11, 2006

it'd probably be best to dump all of the elements to a .fla (any decompiler will do this), then build the file from the ground up from scratch... it's not fun to edit decompiled code, and nearly impossible if the previous author was not an actual programmer.

P.S. You may want to be worried that if you don't have the .fla, you may not have the rights to use the contents of the .swf in other ways. Usually companies make you pay extra for the source files, and if your company didn't pay extra, they could be sued if the previous company finds out.
posted by hatsix at 9:13 PM on June 11, 2006

When I needed to do this last year (in a slightly different situation, because I was mostly dealing with my own legacy code from the Flash 5 days), one thing that helped me was to write some JSFL to dump out all the contents of the movie to a text file, so that I could see where the ActionScript was hiding.

I don't know if it will be useful to you, but here's the code I used--it's a Ruby script that generates and runs a JSFL script to write a description of a FLA to a text file. Call it at the command line with the names of the FLAs you want to dump. (I know it's not as convenient as it could be--I'm working on a Mac, so I've got Ruby installed automatically--but you might be able to get something useful from it).

Within Flash, the Movie Explorer pane is your friend, especially if you're not on a Mac. (And, honestly, if you are on a Mac, you should see if you can't find a Windows box to do your Flash work on--it's amazing how much faster it is there).
posted by moss at 9:23 PM on June 11, 2006

Oh, wait, do you not have the FLA? If you're having to decompile a SWF, that does make things harder.
posted by moss at 9:25 PM on June 11, 2006

Response by poster: 99% of the time I'll have the original FLA, so that's not an issue.

I'm interested in tips on figuring out how someone put together a flash file. Are there well-known ways for flash designers to piece together how something is built? Or is it still a matter of digging through each layer / clip / asset one by one?

As I said, it's been a couple of years since I touched Flash last, and I was merely adequate back then... so feel free to point out obvious stuff. I probably won't know it. Thanks!
posted by theNonsuch at 10:31 PM on June 11, 2006

Are there well-known ways for flash designers to piece together how something is built?

There are best practices and then there's Flash. It all really depends on who did the piece and the skill level. Riemann laid out the possibilities pretty well, I'd add that the Movie Explorer is your friend, and oddly enough, a swf decompiler can sometimes give you more info than the IDE in the nightmare cases of code on nested movieclips.

If you're lucky, everything will be laid out in AS2. If not, have fun ;)

re: coming up to speed with Flash 8, there aren't any major leaps to worry about since 7 (unless you start doing BitmapData stuff). More people are moving to using Delegate, Broadcaster, and the newer event model stuff, but those have actually been around for a while. The switch from AS2 -> AS3 will be a bigger deal with Flash 9, but it's still not bad.
posted by ryoshu at 11:23 PM on June 11, 2006

« Older Any free or cheap online contact managment...   |   What are some decent latin nightlife spots in... Newer »
This thread is closed to new comments.