Reprinted, please ensure the integrity of the article!
Link: http://blog.desizen.com/4lone/589.html
Homepage: Joel's blog
In this example, tourdeflex: Ui controls: Other controls: videodisplay
In this example, a FLV file is used. Click here to download the file. Unzip the file and put it in the SRC folder.
Introduction:
The videodisplay control lets you play an FLV file in a flex application. It supports progressive download over HTTP, streaming from the Flash Media Server, and streaming from a camera object.
Example:
<? XML version = "1.0" encoding = "UTF-8"?> <Mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml" layout = "horizontal" verticalalign = "TOP" horizontalalign = "center" align = "[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 = "0 xffffff" textalign = "C Enter "htmltext =" {titletext} "/> <! -- Display the title in HTML format --> <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 (); "/> <! -- Control button --> <mx: button label = "pause" color = "0x00000" Click = "myvid. pause (); "/> <mx: button label =" stop "color =" 0x00000 "Click =" myvid. stop (); "/> </MX: hbox> </MX: vbox> </MX: Application>