转载 http://blog.minidx.com/2009/06/15/2607.html
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application name="VideoDisplay_maintainAspectRatio_test"
- xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <mx:ApplicationControlBar dock="true">
- <mx:Form styleName="plain">
- <mx:FormItem label="maintainAspectRatio:">
- <mx:CheckBox id="checkBox" />
- </mx:FormItem>
- </mx:Form>
- </mx:ApplicationControlBar>
- <mx:VideoDisplay id="videoDisplay"
- maintainAspectRatio="{checkBox.selected}"
- source="http://helpexamples.com/flash/video/cuepoints.flv"
- autoPlay="false"
- width="200"
- height="200"
- click="videoDisplay.play();" />
- </mx:Application>