Flex中如何利用maintainAspectRatio属性使VideoDisplay保持载入时比例的例子

转载 http://blog.minidx.com/2009/06/15/2607.html

 

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application name="VideoDisplay_maintainAspectRatio_test"
  3.         xmlns:mx="http://www.adobe.com/2006/mxml"
  4.         layout="vertical"
  5.         verticalAlign="middle"
  6.         backgroundColor="white">
  7.     <mx:ApplicationControlBar dock="true">
  8.         <mx:Form styleName="plain">
  9.             <mx:FormItem label="maintainAspectRatio:">
  10.                 <mx:CheckBox id="checkBox" />
  11.             </mx:FormItem>
  12.         </mx:Form>
  13.     </mx:ApplicationControlBar>
  14.     <mx:VideoDisplay id="videoDisplay"
  15.             maintainAspectRatio="{checkBox.selected}"
  16.             source="http://helpexamples.com/flash/video/cuepoints.flv"
  17.             autoPlay="false"
  18.             width="200"
  19.             height="200"
  20.             click="videoDisplay.play();" />
  21. </mx:Application>

 

你可能感兴趣的:(Flex,layout,application,encoding)