views:

211

answers:

1

i have a VideoDisplay

 <mx:VideoDisplay id="myVideo" width="100%" height="100%">      
</mx:VideoDisplay>

and i put the video like this:

video = new Video();
video.attachNetStream(ns);
myVideo.addChild(video);

and i want to make the child inside VideoDisplay to resize with him to make his size 100%/100% (size of the child)

cuz video.height and width accept only integers and ican't put % in there

A: 

:D i found the answer myself all i had to do is this:

<mx:VideoDisplay id="myVideo" width="100%" height="100%" resize="video.height=myVideo.height; video.width=myVideo.width;">      
</mx:VideoDisplay>
Omu