If your support form requires the serial number, why doesn’t the About box let you copy the serial number?
We have a Flash component we are building to replace a pure Javascript graph widget that needs the ability to support modal windows in a way that the web browser will not. You click on a grid to log hours assigned to an activity, and program logic checks the hours, occasionally asking you to fill out a sub form or giving you information or error messages. Flash and its form application seemed like the way to go, so we upgraded our version of Flash to MX Professional 2004.
I’ve been fighting with this for the past 3 or 4 weeks, and I have to admit – Flash, at least with the form application components, is about the most unfriendly, unintuitive, and painful development environment I have ever worked with. I’ll just start my laundry list of rants, because I am absolutely livid at this point.
First off, if you use the application.form components, I can find no syntax that allows the javascript program to talk to the Flash component and move the play head, etc. All attempts fail. I finally had to nest the form app inside a regular Flash movie. The Javascript file talks to the regular swf, which then moves the play head on the form app. I could set values in the form app directly, but they would not display unless the Flash movie was somehow refreshed (for example, if a Javascript alert stole focus for a second, after which the new value would show up), so the script is talking to the swf somehow – it’s just being ignored.
The focus management in Flash is absolutely ridiculous. If I’m typing in the text editor, then I alt-tab off to the web to look something up, when I alt-tab back I certainly expect the focus to still be in the text window I was typing in, *not on the stage.* I don’t know how many times I’ve deleted objects I needed because, although there was still a cursor in the text window, the focus was on the stage, so when I hit backspace I deleted an object. At best I wind up moving objects that were carefully aligned. I have to lock things just to protect myself from this horrible interface oversight. The least you could do is hide the cursor mark when you take the focus away from the editor (the cursor stays, it just stops flashing).
If I build a new MovieClip object in my form app, it will not load by any means, nor will any other movie clip after that. The only trick I have found is to create a graphic, do my tweening, then convert that to a movie clip. This seems to fool Flash and it lets things run. The real problem is that, once you step into this trap, you cannot get out short of reverting… no number of undo’s will make the movie clip into the movie. This is a ridiculous bug that only seems to affect form apps… I can go load the movie clip into a regular Flash movie and it works just fine… it’s the forms that are broken. I ordinarily save quite often – with Flash I put it off until the last possible minute so that I don’t save with one of these heinous bugs active in my file.
This combines well with the occasional trick Flash does when you try to get the time line on the application object. Sometimes it won’t take the focus. You click around, trying to select some form or screen instance in the outline and click on its timeline (this was when I was trying to set a break point – see below), and then Flash GPF’s and takes you work with you because you’r afraid to save it until you know it actually did what it was supposed to.
While it’s nice that you can add data types to variables and catch an occasional type mismatch error, it would sure be nice if Flash did a little more error reporting… like when I try to load a movie clip and it doesn’t work, Flash doesn’t give me any clue that anything is wrong, so I have to take out my shovel and my magnifying glass and write a million print statements to try to find the problem. This is largely because the debugger itself is all but worthless in a form based app. You can’t set up any timeline events to trigger it, unless you spawn them from the shell movie I have loading my form movie. In the dbugger, you have to dig down the piece you want *every single time* because the debugger has no memory whatsoever of what transpired before. It would be best if Flash had a “strict” mode like Perl or VB that would let you know if you used an undeclared value… debugging would be much simpler. It would also be handy if trace() did something in a running movie, not just in the dev environment. My movie interacts heavily with the hosting script… there’s no way to test that in the player.
Your Alert control is all but worthless since it doesn’t steal mouse events from its parent. If you pop an alert on a mouse up event, when you click okay to clear it you get another copy because the the parent got the click again. You have to hand code around it. Why isn’t alert modal? I spent half a day fighting with that, finally building a new form screen to do the job. In another language it would have been as simple as: MessageBox(“Here’s your message”)
That sent me down the path of trying to use createPopUp(). Finally got it where it would pop up a window and load my movie clip, but it would not let me access the values of the movie clip (I’d like to set the message text programmatically) – window.content always traces as undefined. In desparation, I gave up and created a movie clip that contains my hard coded message text. The application loads my window, displays my movie clip, even lets me (gasp) center the window on the form! Success at last!
But wait… that’s in the movie viewer. When you load the movie into a web page, the window appears, but the movie clip doesn’t show up in the window.
Why is it so hard to accomplish something as simple as a confirmation dialog in Flash?
As long as I’m complaining, in order to make our application run standalone and on the web, we have an Asynchronous Pluggable Protocol for Windows that makes our application simulate a web server (we don’t want to force standalone users to run a web server) to serve rendered HTML from XML data. The Online version just uses XML web services to retrieve the output.
While the XML support in Flash seems strong, it refuses to go anywhere near my custom protocol, so short of having it in actual files or stored on a server, I cannot use Flash to access my APP. I have to feed everything into the movie by hand because Flash is too paranoid to let me talk through my custom protocol. If a custom protocol has been installed on a machine maliciously, it was compromised long before your Flash movie tried to run. This bit of “security” is buying me nothing but heartache.
Now, maybe I’m a complete neophyte, newbie, and moron, but it appears that I’m trying to use some advanced features of Flash that just do not work. Maybe they’ll be fixed in this upcoming patch, but in all honesty I am not getting my hopes. I’ve posted some of these issues in forums like Flash Kit and Flashmove, but no one seems to have any input. My sole desire at this point is to get past the issues with this component so I can get to the next thing and never use Flash ever again.
I apologize for ranting. It’s probably more of a catharsis than anything else, since I don’t expect any of this to be fixed or changed – I expect you to tell me to wait for the update, but I’m already way behind schedule because of this, and that’s not due out until next month.
You have my best wishes for turning this into premium development environment. You have a lot of work to do before it’s ready for prime time though.
But it’s great for making ad banners.
Now, if you’ll excuse me, I need to go roll back to yesterday’s version of my SWF because your movie clip bug has broken my application again and, unfortunately, I saved it.