Avoid loading content in the first frame

This is one of the problems I answered on cookbooks.adobe.com please check it out and submit questions.

How do I get Embed to not load content in the first frame of my Flash CS4 document?

Problem

When using the Embed tag, [Embed(source="stuff.swf", symbol="a_mc")], it loads all embedded content in the first frame, even before my stage color loads. This renders my pre-loader useless. I make casual games and many game sites want all assets in one swf file, so I can’t use a separate swf as a pre-loader. I have gone into Publish settings and set “Export classes in frame” to 3 and that didn’t prevent all the content from loading in the first frame.

Solution

Create a listener to make sure that the movie has loaded, this is in AS2 (assumption because the question called for “a_mc” in the request). In AS3, this can be solved by creating your preloader then calling a function that adds the movie to the stage.

Check the answer here.

Related Posts Plugin for WordPress, Blogger...