flex学习笔记3

视频播放器源码,包括音量、全屏模式、网络flv播放、定位播放


mxml 代码
 
  1. xml version="1.0" encoding="utf-8"?>  
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  width="835" height="782" >  
  3. <mx:Script>  
  4.     
  5. mx:Script>  
  6. <mx:XML id="xmlData" source="FlvData.xml" format="xml" />  
  7. <mx:VideoDisplay id="flvideo" playheadUpdate="playingMove(event)"  x="10" y="10" autoPlay="false" bufferTime="0.5" maintainAspectRatio="false" width="294" height="219"/>  
  8.     <mx:ControlBar id="ctrlBar" x="10" y="237" width="545" height="52">  
  9.           <mx:TextInput id="urlText" width="150" keyUp="onChangeUrl(event)" fontFamily="Arial" fontSize="12" color="#2C2B3A" enabled="true" height="26" toolTip="请输入flv文件的网络地址"/>  
  10.         <mx:Button  label="Play" click="playMovie(event)"/>  
  11.         <mx:Button  label="Stop" click="stopMovie(event)"/>  
  12.         <mx:Button  label="pause" click="pauseMovie(event)"/>  
  13.           
  14.     mx:ControlBar>  
  15.     <mx:ControlBar id="ctrlBar0" x="10" y="297" width="545" height="52">  
  16.     <mx:Label   
  17.         text="音量"  
  18.         color="#ffffff"/>  
  19.            
  20.         <mx:HSlider id="hs_sound" width="80"  
  21.             minimum="0" maximum="1"  
  22.             thumbRelease="sound_thumbRelease(event)"   
  23.             change="sound_thumbChanges(event)"  
  24.             value="{flvideo.volume}" />  
  25.         <mx:CheckBox id="displayChk" label="全屏模式" change="displayStateChange()"/>  
  26.          
  27.     mx:ControlBar>  
  28.     <mx:ControlBar id="ctrlBar1" x="10" y="357" width="545" height="52">  
  29.         <mx:Label x="480" y="341" id="playtime"   
  30.         text="{formatTimes(flvideo.playheadTime)} : {formatTimes(flvideo.totalTime)}"  
  31.         color="#ffffff"/>  
  32.         <mx:HSlider  minimum="0"  id="my_hs"  change="hs_onchange(event)" width="179"/>  
  33.          
  34.     mx:ControlBar>  
  35. mx:Application>  
<mx:application height="782" width="835" layout="absolute" xmlns:mx="http://www.adobe.com/2006/mxml"><mx:xml format="xml" source="FlvData.xml" id="xmlData"><mx:videodisplay height="219" width="294" maintainaspectratio="false" buffertime="0.5" autoplay="false" y="10" x="10" playheadupdate="playingMove(event)" id="flvideo"><mx:controlbar height="52" width="545" y="237" x="10" id="ctrlBar"><mx:textinput tooltip="请输入flv文件的网络地址" height="26" enabled="true" color="#2C2B3A" fontsize="12" fontfamily="Arial" keyup="onChangeUrl(event)" width="150" id="urlText"><mx:button click="playMovie(event)" label="Play"><mx:button click="stopMovie(event)" label="Stop"><mx:controlbar height="52" width="545" y="297" x="10" id="ctrlBar0"><mx:label color="#ffffff" text="音量"><mx:hslider value="{flvideo.volume}" change="sound_thumbChanges(event)" thumbrelease="sound_thumbRelease(event)" maximum="1" minimum="0" width="80" id="hs_sound"><mx:controlbar height="52" width="545" y="357" x="10" id="ctrlBar1"></mx:controlbar></mx:hslider></mx:label></mx:controlbar></mx:button></mx:button></mx:textinput></mx:controlbar></mx:videodisplay></mx:xml></mx:application>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值