hi,
i am having this little problem of making my video fit to my browser width and height.
and it needs to get itself be the last layer as well.
is getNextHighestDepth() a wrong command here?
how do i add swap depth or something?
it needs to be a layer beneath my navigation and everything.
thank you!
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
var timeline:MovieClip = this;
var _minW:Number = 360;
var _minH:Number = 204;
var video_container:MovieClip = timeline.attachMovie ('video_container', 'video_container', timeline.getNextHighestDepth());
function onResize ()
{
var scaleY:Number = Math.round (100 * (Stage.height) / _minH);
var scaleX:Number = Math.round (100 * (Stage.width) / _minW);
var scaleFactor:Number = Math.min (scaleY, scaleX);
if (scaleFactor > 100) video_container._xscale = video_container._yscale = scaleFactor;
video_container._x = Math.round ((Stage.width / 2) - (video_container._width / 2));
video_container._y = Math.round ((Stage.height / 2) - (video_container._height / 2));
}
var connection_nc:NetConnection = new NetConnection ();
connection_nc.connect (null);
var stream_ns:NetStream = new NetStream (connection_nc);
video_container.my_video.attachVideo (stream_ns);
video_container.my_video.smoothing = true;
stream_ns.play ("test.flv");
Stage.addListener (this);
onResize ();