package {
import flash.display.*;
import flash.net.*;
import flash.display.*;
import flash.text.*;
public class MainStageDocCLass extends MovieClip {
public var myLoader:Loader = new Loader();
// create a new LocalConnection instance used to listen
// for calls from a LocalConnection instance from another movie
var incoming_lc:LocalConnection = new LocalConnection();
// create a local connection listening to a connection
// with the name "lc_example"
incoming_lc.connect("lc_mainStage");
public function MainStageDocCLass() {
loadItems("TopNavigation.swf", 0, 0);
trace("MainStageDocCLass.as has loaded");
}
// define an method which will be called when a message
// is sent from a LocalConnection instance from another movie
function methodToExecute(param:String):void {
sentMessage_txt.text = param;
}
// set the client reference of the LocalConnection instance
// to the object containing the method needing to be called
incoming_lc.client = this;
public function loadItems(clip:String, ypos:uint, xpos:uint):void {
var myLoader:Loader = new Loader();
addChild(myLoader);
myLoader.load(new URLRequest(clip));
myLoader.x = xpos;
myLoader.y = ypos;
}
}
}