可以用 Flex Builder 3 来验证 sample.flv 的点播效果,源码如下:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ [Bindable] private var TitleText:String = "<b>VideoDisplay Control:</b>" + "/n" + "Use the buttons to control the video."; ]]> </mx:Script> <mx:VBox backgroundColor="0x323232" width="400" height="240" backgroundAlpha="1" horizontalAlign="center" borderThickness="4" borderColor="0x545454" cornerRadius="4" borderStyle="solid" paddingTop="5" > <mx:Text width="75%" color="0xffffff" textAlign="center" htmlText="{TitleText}"/><!--使用html方式显示标题--> <mx:VideoDisplay id="myVid" height="146" width="220" source="rtmp://localhost/vod/sample" autoPlay="false"/> <mx:HBox> <mx:Button label="Play" color="0x00000" click="myVid.play();"/><!--控制按钮--> <mx:Button label="Pause" color="0x00000" click="myVid.pause();"/> <mx:Button label="Stop" color="0x00000" click="myVid.stop();"/> </mx:HBox> </mx:VBox> </mx:Application>