views:

107

answers:

1

i'm simply playing a video file the normal way:

var nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
var vid = new Video();
this.addChild(vid);

vid.attachNetStream(ns);
ns.play(videofile);

My flv file is actually 600x678, but shows up scaled down on the stage, and tracing the width and height I get 320x240. I'm not setting this anywhere. Why is it getting scaled down?

+1  A: 

I believe 320x240 is the default size of the Video object. Have you tried resizing it?

quoo
Yes, I can resize it. But I have to create many of these and would rather not have to determine and input the sizes of every video clip. I don't recall ever having to manually set the size of video objects before.
Perhaps you were using FLVPlayback (or another more built out video player) in the past, which would handle this for you. To size the video to the dimensions of the video stream, you'll need to listen for the meta data event and size the Video object based on the parameters received.
quoo