flash - Preloader for SWF with embed bytearray -


Full SWF is not showing the compliant SWF preloader until it is fully loaded. Any help would really be appreciated, I could not find anything on this night, at least for me

itemprop = "text">

You can not embed byte in your main document class, because the class referenced from the document class Automatically will be included on frame 1.

The best way to preload is to have a separate preloader class and main square for the property. You want to export your Preloader class to frame 1, and keep your main square and assets on 2 frames.

Unfortunately, it should be as much as possible, but here's how you can do this: Set up your document class Preloader in this category your LoaderInfo code, however, when you finish loading, do not mainly focus on the main , do not do this var main: main = new main () . This will automatically motivate men to compile on frame 1, whatever you will do. Instead, it indirectly, immediately like this:

  nextFrame (); // You sometimes need to register the classes exported on the frame 2 var mainClass to the player: Class = Flash.Util.GetiffinitionByman ("Main") as the class; Var main: sprite = new main class (); AddChild (main);   

This will stop the compiler manually from shutting down with Rank 1.

Next, if you are using Flash CS3 + IDE, then File-> Go to Publish Settings - & gt; Flash-> Change the "Import Class on Frame" setting to ActionScript 3.0 settings and 2 frames. Then, on the frame 2 of your movie, clip a blank movie. Inside this movie clip, insert this code to keep the reference of your main category: var dummy: main; The reason for doing this is that the compiler will still know that you are using the main, so it will actually compile it in the movie, otherwise it will not compile it at all. You do not want to even put it on the main timeline, because at the main time any code reference is automatically found on frame 1.

In the IDE, an assistant trick to check the export of things to publish their proper location Properties-> Publish in Flash "Generate Size Reports" You can check the report and easily Note that junk has exported on frame 1.

If you are using Flash Builder, FlashDial, or FDT, the process is basically the same - create different preloaders and main classes, and indirectly main presentation by preloader but after the preloader To signal the compiler to compile the main on the frame, this metatag should be used as the main code in the above class in the main as :

 < Code> [frame (factoryClass = "Preloader")]   

Flash developer Rojekt tab may adopt SWF files by clicking next to him. This will show you which frame has been exported exclusively, you only want the minimum minimum of Preloader on 1 frame.

Comments