Here’s my problem:
Make a movieclip 100 x 100 and place it off the stage. The default stage size for a swf is 550 x 400 px. Publish it, CTRL + ENTER and you get a swf at 550 x 400 and of course you cannot see your 100 x 100 movieclip that is off the stage.
But, now if you import that swf into another swf; what is its height and width? 100 x 100 is what it is. This is a problem if you are trying to then center the imported swf within your main swf.
My exact problem:
I have a main swf, its stage is 1024 x 768. I have another swf that will eventually get loaded into the main swf; its stage is also 1024 x 768. BUT, it has all sorts of stuff placed off the stage, thus giving it a 1074.9 x 1607 dimension. Not good, one would expect it to be 1024 x 768.
The below code wont work because of this. swfHolder_mc Is the mc where the imported swf goes.
var stageWidth_num:Number = Stage.width;
var stageHeight_num:Number = Stage.height;
var newX:Number = (stageWidth_num/2) - (swfHolder_mc._width/2);
var newY:Number = (stageHeight_num/2) - (swfHolder_mc._height/2);
swfHolderMain_mc._x = newX;
swfHolderMain_mc._y = newY;