How to load flex swf from flash?

混江龙づ霸主 提交于 2019-12-23 17:41:11

问题


I have some swf compiled in flex I want to load it into my movie clip in flash pro.

...So how to for example load flex swf inside Flash CS4?

how to do such thing?


回答1:


Here you can read more about it: http://troygilbert.com/2009/05/loading-flex-based-swfs-in-as3-only-swfs/

Here is the code for loading the flex swf:

var loader:Loader = new Loader();
addChild(loader);
loader.load(new URLRequest("my-flex-app.swf"));
loader.addEventListener("mx.managers.SystemManager.isBootstrapRoot", systemManagerHandler);
loader.addEventListener("mx.managers.SystemManager.isStageRoot", systemManagerHandler);

function systemManagerHandler(event:Event):void { event.preventDefault(); }


来源:https://stackoverflow.com/questions/2354612/how-to-load-flex-swf-from-flash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!