开发者

SWC Loading issue

Is it possible that even if I'm using a class from a swc it does not get merged into my SWF? I have the SWC as external but as soon as I use any of the classes my swf size jumps.

Secondly, if I'm making a preloader should I load the classes and swc in the mainproject or load the compiled 开发者_如何学编程swf ?


If you are using Flash IDE, you can choose to exclude include the classes your using in the publish settings (Actionscript tab). If you exclude a SWC from the main SWF you need to make sure to preload the SWF containing the classes before attempting to access them.

The loading strategy depends on the size of your swf and when you are accessing them. For example if a section of your website is using some big assets contained in a shared library but that users might not enter the section at each visit you might consider preloading the library on demand when the section is requested only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜