PDA

View Full Version : FLV video size wrong when loading in Flash?



wvoets
July 30th, 2007, 08:10 AM
Hey All!

I'm having trouble with an FLV file I'm trying to play.
I've encoded the file with Flash Video Encoder.
Resized it to 100x130px.

When i load it in Flash with the following code. It plays, but...
The size isn't right... It plays at approximatly twice the size it should be.


var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
videoStream.play("video1.flv");
var video:Video = new Video();
video.attachNetStream(videoStream);
addChild(video);

Any thoughts on what I'm doing wrong?
Many thanks in advance! Cheers, Wim

wvoets
July 30th, 2007, 09:37 AM
I managed to get the size right by just adding this:

video.width = 130;
video.height = 100;

But it's still weird why flash dousn't display the video the right size.
Any thoughts are always welcome!

Cheers, Wim