Editing Flash files

Are there any free flash editors out there?

I have a Web page with an administrative interface that uses a bit of Flash to upload files. Having changed domains and servers, everything works fine except for one thing—it’s uploading documents to the wrong place (i.e., it sends files to olddomain.com/same_file_structure instead of newdomain.com/same_file_structure. In theory, it should be a very simple change: I know where the documents are going, so I know what to search on to find the right line of code to change.

But Flash CS3 weighs in at $700, and as this is for a non-profit there’s no chance of getting it. Also a trial copy was installed a long time ago (but never used), so that’s not a viable avenue. I’m a bit hesitant to find a programmer to make such a minute change, again because of budgetary concerns and because without being able to see the code, there is a bit of nervousness in finding someone I trust (I hope that doesn’t make me sound paranoid).

Oh, I have Dreamweaver 2004, but without Flash installed it doesn’t seem to be able to open the files—I mention this in case (the all-to-often case) I’m an idiot and Dreamweaver actually will work.

Any thoughts?

Thanks,

Rhythm

Do you have the source code (.fla) or just the compiled code (.swf)? If the former, the best bet is to find someone with a copy of Flash to change it for you. There may be some third-party Flash compilers out there, but I can’t vouch for how well they work. (Google “Flash compiler” – apparently there is some open source Flash compiler out there). If you only have the compiled code, then things have gotten a bit more difficult. You’ll have to first get a decompiler, decompile the code, and then recompile it through Flash or something else.

Fortunately, I have both.

With an open-source compiler, is there any way of knowing if things worked well or not before turning the reigns over? Anything I should watch out for?

Personally, I wouldn’t know, having never tried compiling anything other than through Flash. Somebody who knows better hopefully will come along, but I don’t think it would be that hard to find someone with a copy of Flash who would be willing to make the change quickly for you. Or can’t you install the trial copy on another computer?

Did you look at the HTML file that the Flash movie is embedded in to see if a query is being sent to the SWF to tell it where to upload?

Something like:
movie.swf?uploaddirectory=http://olddomain.com/folder_name

Here’s the line in question:
var tag = new FlashTag(‘fileUpload.swf?id=<?php echo($id); ?>’, 320, 80);
The $id string is the country id that was passed to it from the preceding page. A visitor is looking at a country’s profile, then clicks a submit button next to a ‘related resources’ section. That brings them to a submit.php page, in which the Flash bit is embedded. In testing the page, it made the right changes to all parts of the database (i.e., the connection files were editiable by me), but the file never made it to the ‘right’ location.

I remain open to the possibility that I am an absolute moron, but since everything else seems to work except the file ending up where it is supposed to go, I can’t find anywhere else where the problem could be. Of course, things are a bit catch-22ish, since I can’t (yet) look inside the Flash file to see if it is indeed where the wrong location is.

According to the embed code, it does seem that the location is indeed inside the FLA and not in the code, as I (and you too) suspected.

If you were an absolute moron, might you have missed a setting somewhere else in the code that tells the files where to go? Did you do a very thorough hunt through all of the site’s files to make sure there’s no references anywhere to olddomain.com?

You probably did, but I figured I’d ask.

If more people took the time to ask me if I was being an idiot, I’d have done many fewer idiotic things. That being said, I’ve gone over the code fairly intensely (there were a LOT of other changes to make in the transition), and while there may be an unturned stone I missed, I keep coming back to this file as holding the location.

Well have you checked the flash code to trace through what should be happening with a file upload? If you can confirm that it indeed seems to be doing something fishy, then spending time finding a compiler seems to be worthwhile.

What is the whole flash software though? It seems odd that you would have the source code unless your company was the developer itself, in which case you should have the flash compiler somewhere about. If it was made by a third party, then it’s their bug and hence their deal to fix, even if all it means is that you fix the code and then send it over to them to be compiled for you.

You’ll get a lot of junk, but if you open up an FLA file in a text editor, you should be able to see the Action Script. I’ve tested it with a bunch of FLA files, and I can read most of the code.

If you want, I do have Flash. I’m not an expert in it, but I could certainly have a look. Email should be in my profile.