unity3d 3.5发布flash和其他flash之间的通信 简单介绍
http://forum.unity3d.com/threads/116650-UnityShared.swc-Communicating-between-Unity-Flash-Content-and-AS3.具体测试方法
你要下载
AS3Communication_unity_project.zip
AS3Communication_as3_src.zip
这2个包
测试通信是在AS3Communication_as3_src.zip
新建一个flash 工程,把里面用到的as 和swc关联
测试原理
通过原生的swf 调用unity3d生成的swf ,通信用到 unityContentLoader
发送事件到 unity3d
unityContentLoader.unityContent.sendMessage("Main Camera","SetResponder",{responder:this});
等于 var MainCamera = GameObject.find("Main Camera");
MainCamera.SetResponder(responder);
从unity3d 到 其他的swf
先要注册这个外来的 swf
public object responder;
然后用 FlashHelper.EmitAsm
FlashHelper.EmitAsm("SendToFlashScript$responder$['unityHelloFunction']({0})",this);
good,分享分享 ding{:5_399:} 谢谢分享学习了 这个图片真的是很漂亮哦 感谢分享... 这个例子在flex中搞不定啊!那位知道怎么回事 谢谢分享学学 感謝樓主分享 好帖就是要顶
页:
[1]