Hey there Jon,
I do not believe the exact method you want will work. It seems to me that the MovieClip object, which is a DisplayObjectContainer, or extends DisplayObjectContainer, utilizes a Composite design pattern where in it's children are affected when it is affected. Think about making a movieclip as below:
var mc:MovieClip = new MovieClip();
addChild(mc);
var mcChild:MovieClip = new MovieClip();
mc.addChild(mcChild);
now if you move the parent, mc, mcChild moves the exact amount of pixels preserving its "x" and "y" positions as well as all other attributes.
That all being said, what you need is to place your VideoPlayer on the outside of the resizeable movieclip. It is quite likely that once the movieclip's size changes you may want to position the video player in the same relative position.
var mc:MovieClip = new MovieClip();
addChild(mc);
var vp:VideoPlayer = new VideoPlayer();
vp.x = mc.x + 10;
vp.y = mc.y + 10;
addChild(vp);
/**
*If mc's registration point is "Top-Left" then adjustments aren't
*required because mc will span down and to the right, otherwise we
*need to reposition the video.
*/
function resizeMovie(pWidth:Number, pHeight:Number):void
{
mc.width = pWidth;
mc.height = pHeight;
adjustVideo();
}
function repositionMovie(pX:Number, pY:Number):void
{
mc.width = pWidth;
mc.height = pHeight;
adjustVideo();
}
function adjustVideo():void
{
//This is where we make sure of vp's positioning upon mc's change.
vp.x = mc.x + 10;
vp.y = mc.y + 10;
}
So anytime we affect the main, we can affect other objects in our own manner. This same idea works with resizing of the stage.
stage.addEventListener(Event.RESIZE, onStageResize);
function onStageResize():void
{
//Make mc the size of the stage
mc.width = stage.stageHeight;
mc.height = stage.stageHeight;
//Position video in relation to mc
adjustVideo();
}
In the end, MovieClip is set to adjust its children relative to how itself is being adjusted. As a DisplayObjectContainer it makes sense that the items inside of it are dictated by the parent (the movieclip) and to accomplish what you want you merely need to abstract your video player out of the swf and make changes to it accordingly.
Brian Hodge
http://www.hodgedev.com