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