loaded AS2 swf call function in AS3 holder

AS3 file:
ActionScript Code:
var loader:Loader = new Loader(); loader.load(new URLRequest("AS2file.swf")); addChild(loader); var receiveSwf_lc:LocalConnection = new LocalConnection(); receiveSwf_lc.client = this; function showGallery1(){     var requestNew:URLRequest = new URLRequest("newAS3.swf");     var loaderNew:Loader = new Loader()     loaderNew.load(requestNew);     holderMC.addChild(loaderNew); } //listen.... ("connection name") receiveSwf_lc.connect("AVM1toAVM2");


AS2 file:
ActionScript Code:
var sendSwf_lc:LocalConnection = new LocalConnection(); loadBtn.onRelease=function(){     //send instruction.... ("connection name", "function name")     sendSwf_lc.send("AVM1toAVM2", "showGallery1"); }

from:http://www.actionscripts.org/forums/showthread.php3?t=173490
posted @ 2009-10-14 10:33  zhangsir  阅读(234)  评论(0编辑  收藏  举报