// Define a variable to reference your exported-for-actionscript
// library element. Just create an empty movieclip and set its
// export-for-actionscript property appropriately
var header_mc:mc_holder = new mc_holder();
function init():void
{
/////////////////////////////////////////// BEGIN Add Header
var loadHeader = new Loader(); // temporary variable to reference the Loader class
addChild(header_mc); // add our holder
header_mc.addChildAt(loadHeader,0); // (You could just use addChild)
loadHeader.contentLoaderInfo.addEventListener(Event.COMPLETE, positionHeader);
loadHeader.load(new URLRequest("loadee.swf"));
/////////////////////////////////////////// END Add Header
}
function positionHeader(e):void
{
header_mc.x = stage.stageWidth/2 - header_mc.width/2;
header_mc.y = stage.stageHeight/2 - header_mc.height/2;
}
init(); // Make it so.