I am having a problem trying to center a movieclip within an externally loaded swf.
To test, I placed one instance of the movieclip on the first frame of the timeline on child.swf and centered it and the other is displayed using actionscript. They both align perfectly when I test the swf.
The problem is that when I load this swf into another movie (parent.swf) they are no longer aligned with each other.
I used this code to align the movieclip in child.swf. It works fine when I
open child.swf on it’s own but when I load child.swf into parent.swf the movieclips are not aligned.
var logowrapMc:logowrap = new logowrap();
logowrapMc.x= stage.stageWidth / 2;
logowrapMc.y= stage.stageHeight / 2;
addChild (logowrapMc);
Here’s the code for parent.swf
var swf:MovieClip;
var loader:Loader = new Loader();
// default swf
var defaultSWF:URLRequest = new URLRequest("swfs/child.swf");
loader.load(defaultSWF);
// position load SWF with variable, 480 x 300 are half the width/height of child swf
loader.x = stage.stageWidth / 2 - 480;
loader.y = stage.stageHeight / 2 - 300;
// add default loaded swf
addChild(loader);
any help is most appreciated