Media size using OSMF
Hi,
I am playing around with the OSMF plug in and I am trying to set the size of the SWF to the size of the media in the MediaPlayerSprite. I can set the media to the size of the SWF but I want the other way round, the SWF to the size of the media. I have two questions:
1. Is it possible to load a media (FLV, jpg etc) and then set the size of the SWF
2. How do you get the size of the media e.g. trace( mediaWidth); trace(mediaHeight);
my code:
var sprite:MediaPlayerSprite = new MediaPlayerSprite();
addChild(sprite);
sprite.width=stage.stageWidth;
sprite.height=stage.stageHeight;
sprite.x=0;
sprite.y=0;
sprite.scaleMode=ScaleMode.STRETCH;
sprite.resource = new URLResource("5.jpg");
trace(sprite.stage.stageWidth);
trace(sprite.stage.stageHeight);