开发者

actionscript 3.0 - .swf nested within a .swf?

开发者 https://www.devze.com 2022-12-27 18:24 出处:网络
I know how to load in a .swf from an external fil开发者_高级运维e. However, I don\'t know how to run one that\'s already in the library. Is it possible to have a .swf nested within a .swf? I want the

I know how to load in a .swf from an external fil开发者_高级运维e. However, I don't know how to run one that's already in the library. Is it possible to have a .swf nested within a .swf? I want the final thing to be just one file. Please help!


If you are using flex, the [Embed] tag works for .swfs too. If you are using Flash, I don't know.. but you can probably import the .swf into your library and make it into a symbol.


If you are trying to embed the contents of one SWF (B) into another (A), and you have access to the FLA for B, what you could do is recompile B as an SWC file (compiled Flash library).

First make sure that everything you need in B is being correctly exported for ActionScript.

Then, to export as an SWC: File -> Publish Settings -> Flash -> Export SWC.

Once you have the SWC for B, add a reference to it in the FLA for A: File -> Publish Settings -> Flash -> Settings -> Library path -> Click + button -> Type in the path to the SWC relative to your FLA (e.g. "./libs/mySWC.swc").

-

In A you'll now be able to reference through ActionScript any of the contents of B.


Swiffotron can combine SWF files together into one.

0

精彩评论

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