文章分类 Classification
Flex3.0入门课程:创建Flex播放器
稿件来源: 阳光企业网站管理系统 撰稿作者: 太阳光 发表日期: 2013-09-18 阅读次数: 95 查看权限: 游客查看
Flex3.0入门课程:创建Flex播放器
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" verticalAlign="top" fontSize="12"> <mx:Script> <![CDATA[ private function getTimer():void { var pDate:Date = new Date(myPlayer.playheadTime * 1000 || 10); var tDate:Date = new Date(myPlayer.totalTime * 1000); progressBar.label = dateFormatter.format(pDate) + "/" + dateFormatter.format(tDate); } ]]> </mx:Script> <mx:DateFormatter id="dateFormatter" formatString="NN:SS" /> <mx:Panel width="520" height="400" title="Flex播放器"> <mx:VideoDisplay id="myPlayer" autoPlay="false" width="100%" height="100%" playheadUpdate="getTimer()" source="flv.flv" volume="{volSlider.value}"/> <mx:HBox paddingBottom="5" paddingLeft="5" width="100%"> <mx:Image source="@Embed('myPlayer/play.png')" click="myPlayer.play()" /> <mx:Image source="@Embed('myPlayer/pause.png')" click="myPlayer.pause()" /> <mx:Image source="@Embed('myPlayer/stop.png')" click="myPlayer.stop()" /> <mx:ProgressBar id="progressBar" source="myPlayer" labelPlacement="center" width="250" height="31"/> <mx:Image source="@Embed('myPlayer/vol.png')" /> <mx:HSlider width="75" id="volSlider" minimum="0" maximum="1" value="0.5" snapInterval="0.1" liveDragging="true" /> </mx:HBox> </mx:Panel> </mx:Application>
关键词: Flex3.0,入门课程,Flex播放器 编辑时间: 2013-09-18 11:54:17
0
高兴0
支持0
搞笑0
不解0
谎言0
枪稿0
震惊0
无奈0
无聊0
反对0
愤怒
0%(0)
0%(0)
- 暂无评论
文章图片 article Pictrue
网友评论