The challenge is to get Flash to open an HTML form with some dynamic text, allow the user to edit that HTML form, and on clicking OK send the text back to Flash. On as many browsers as possible. Ben figured out a ton of stuff over the weekend, and I’m writing it down so I don’t forget.
Our Flash app sends the text to the server using
LoadVars.sendAndLoad(). The returned LoadVars object has a URL, generated by the server, that is used to open an HTML page via
- So you can reload this tiny gateway.swf file, but your variables do no good there! You want to send them back to the MAIN movie! That’s where the Flash inter-SWF communication technique comes in. You can use the
LocalConnectionclass to talk between two different movies on your system, so long as you know what its name is. So the gateway.swf uses this mechanism to talk to the main.swf.
<object>attributes. Kudos to the MLab guys for working out the basic technique, and wrapping it up on their site.
p>Dealing with the non-latin character sets in a way that Flash will digest is a little sticky too, but that’s a topic for another day.