首页» FLEX »FLEX例子之VideoDisplay(FLV视频播放器)

FLEX例子之VideoDisplay(FLV视频播放器)

立即注册PayPal并开始接受信用卡付款。
转载请保持文章完整性!
本文链接地址:http://blog.desizen.com/4lone/589.html
主页:joel's blog

这个例子进行的是:UI Controls:Other Controls:
本例子用到了一个flv文件,点此下载.下载后解压放入src文件夹内.
简介:
The control lets you play an FLV file in a application. It supports progressive download over HTTP, streaming from the Flash Media Server, and streaming from a Camera object.
例子:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" verticalAlign="top"
    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
 
    <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="assets/sample_vid.flv" 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>

标签:, , ,

与"FLEX例子之VideoDisplay(FLV视频播放器)"相关的文章:

1 条评论 »

留下评论

emoticons

Feedback Form