R – FLV: How to stop a VideoPlayer from scaling along with its containing MovieClip

actionscriptflashflv

I'm creating a VideoPlayer object in a swf and that works well. I'm sizing it using autoSize and that's working fine too. I'm trying to make it so that when the containing swf gets larger the video stays at the same size. The swf is actually loaded from another flash movie which is where the resizing happens. Is there a setting in the VideoPlayer class or in the movieclip I can set to make it stop scaling along with the movieclip?

Thanks!

Best Answer

Not that I've tested it, but maybe you could add a handler for Event.RESIZE in the swf which contains the video player. Then do something like this:

private function onResize(e:Event):void
{
  childClip.scaleX = (scaleX != 0) ? (1 / scaleX) : 0;
  childClip.scaleY = (scaleY != 0) ? (1 / scaleY) : 0;
}
Related Topic