Flash Tips

The Flash built-in documentation is completely unhelpful to me. Here are a few things I've figured out.

Embedding one movie in another

You can embed one Flash movie in another, which is useful if you've bought someone's Flash thing and want to stick it in another site. However, you will need to match the Publish settings for the same level of ActionScript and Flash version or it'll fail silently. You probably want to think about this before completing the rest your site as it'll be a pain to have to port all of your ActionScript.

Under ActionScript 2 it's as easy as a loadMovie() call.

Under ActionScript 3, I did the following:

 var loadit = new Loader();

 var variables:URLVariables = new URLVariables();
 var req:URLRequest = new URLRequest("other_movie.swf");
 variables.foo = "bar";
 req.data = variables;
 req.method = URLRequestMethod.GET
 addChild(loadit);
 loadit.load(req);

The URLVariables are passed to the loaded SWF as if they were <param /> tags, which is useful if you need to pass parameters. Unfortunately Flash doesn't seem to let you do this when running off the local file system and will give a "Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found." message. Upload to a Web server to test. It's probably possible to work around this by fiddling with the local security settings.

Reinstalling or adding bits to Adobe CS 3 on a Mac

Getting the message, "Adobe Creative Suite 3 Premium cannot be installed because it conflicts with Adobe Creative Suite 3 Design Premium"? It's because you've run the setup program from the CD again. You should instead look in Applications->Utilities->Adobe Installers and run Add or Remove Adobe Creative Suite 3 Design Premium.