The Straight Dope

Go Back   Straight Dope Message Board > Main > General Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2008, 11:23 AM
Rhythmdvl Rhythmdvl is offline
Charter Member
 
Join Date: Oct 1999
Location: Shakedown Street
Posts: 11,111
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
Reply With Quote
Advertisements  
  #2  
Old 02-25-2008, 11:31 AM
pulykamell pulykamell is offline
Charter Member
 
Join Date: May 2000
Location: SW Side, Chicago
Posts: 25,371
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.
Reply With Quote
  #3  
Old 02-25-2008, 11:34 AM
Rhythmdvl Rhythmdvl is offline
Charter Member
 
Join Date: Oct 1999
Location: Shakedown Street
Posts: 11,111
Quote:
Originally Posted by pulykamell
Do you have the source code (.fla) or just the compiled code (.swf)?

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?
Reply With Quote
  #4  
Old 02-25-2008, 11:49 AM
pulykamell pulykamell is offline
Charter Member
 
Join Date: May 2000
Location: SW Side, Chicago
Posts: 25,371
Quote:
Originally Posted by Rhythmdvl
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?
Reply With Quote
  #5  
Old 02-25-2008, 11:59 AM
ZipperJJ ZipperJJ is online now
Charter Member
 
Join Date: Aug 2001
Location: Northeast Ohio
Posts: 16,547
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
Reply With Quote
  #6  
Old 02-25-2008, 12:06 PM
Rhythmdvl Rhythmdvl is offline
Charter Member
 
Join Date: Oct 1999
Location: Shakedown Street
Posts: 11,111
Quote:
Originally Posted by ZipperJJ
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.
Reply With Quote
  #7  
Old 02-25-2008, 12:16 PM
ZipperJJ ZipperJJ is online now
Charter Member
 
Join Date: Aug 2001
Location: Northeast Ohio
Posts: 16,547
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.
Reply With Quote
  #8  
Old 02-25-2008, 01:08 PM
Rhythmdvl Rhythmdvl is offline
Charter Member
 
Join Date: Oct 1999
Location: Shakedown Street
Posts: 11,111
Quote:
Originally Posted by ZipperJJ
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.
Reply With Quote
  #9  
Old 02-25-2008, 02:24 PM
Sage Rat Sage Rat is offline
Member
 
Join Date: Mar 2004
Location: Howdy
Posts: 13,862
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.
Reply With Quote
  #10  
Old 02-25-2008, 02:27 PM
pulykamell pulykamell is offline
Charter Member
 
Join Date: May 2000
Location: SW Side, Chicago
Posts: 25,371
Quote:
Originally Posted by Rhythmdvl
since I can’t (yet) look inside the Flash file to see if it is indeed where the wrong location is.
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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Send questions for Cecil Adams to: cecil@chicagoreader.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Publishers - interested in subscribing to the Straight Dope?
Write to: sdsubscriptions@chicagoreader.com.

Copyright © 2013 Sun-Times Media, LLC.