(I am new to Actionscript and I am sorry if this is a simple question.)
I am doing a media player in Actionscript and I have the following class hierarchy:
- Main class, extends Sprite, and contains
- VideoPlayer class, extends Sprite, contains a Video object and loads the videos using Netstream
The video player will be embedded in different applications with containers with different sizes. Is there a way to make the video player to resize according to the size of the parent container (as defined in the html / swfobject)?
I played with the "scaleMode" properties on the Main class and I managed to make the flash object to rescale according to the container, but the video has always the same size.
Additionally, I changed the "width" and "height" properties of the Video object, both manually and automatically using the metadata of the video clip, and the video dimensions seem to be wrong - I have a swfobject with 320x240 and when I changed the size of the video to match the swfobject size, it rendered much smaller than 320x240.
Thanks in advance for the help.