Display Video in a Flex application
I need to display Facebook video player in my Flex application. I retrieve URL via FB Graph API to a video being displayed in facebook video player and I pass it to SWFLoader. Unfortunately I have some problems with getting it displayed correctly.
Facebook video player is displayed on Facebook site as 720x244 movie. The movie is displayed in the middle of it (320x240) and on the left and the right side there is black background.
Is there any way to display central part (movie) only with SWFLoader?
Here is my code:
<mx:Box width="320" height="240" verticalAlign="middle" horizontalAlign="center">
<mx:SWFLoader source="{'http://www.facebook.com/v/' + numberOfVideo}" 开发者_Python百科
visible="true" id="video" autoLoad="true" />
</mx:Box>
Usa a mask.
Something like:
<mx:Canvas width="320" height="240">
<mx:Canvas id="theMask" width="320" height="240" backgroundColor="#FFFFFF">
</mx:Canvas>
<mx:SWFLoader source="{'http://www.facebook.com/v/' + numberOfVideo}" visible="true" id="video" autoLoad="true" x="-320" y="-240" mask="theMask" />
</mx:Canvas>
精彩评论