获取视频总时间问题
下面是代码: 我想讲logo的totaltime时间放到new Timer( logo视频总时间 ,)这个总时间这个位置,但是我总是获取不到时间,总是为-1,请问大侠们我应该怎样弄才能得到这个值啊?不胜感激!
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientColors="[#F1F2F6, #FBFCFF]"
creationComplete="flv_video.volume=0.2" applicationComplete="getPosition();init();**initBuffer()"**
backgroundGradientAlphas="[1.0, 1.0]" width="500" height="400" verticalScrollPolicy="off" horizontalScrollPolicy="off"
alpha="1" color="#F6FDFF" borderColor="#05A6F9">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
//程序初始化的时候调整加载进度条的绝对位置
private function getPosition():void
{
logo.stage.frameRate=7;//控制控件的帧的频率 }
private var timer:Timer;
//延迟5秒左右
private function initBuffer():void
{
**timer= new Timer(10000,1);**
timer.addEventListener(TimerEvent.TIMER,autoPlay);
timer.start();
}
]]>
</mx:Script>
<mx:VideoDisplay id="logo" y="101.3" width="253" height="175" source="http://192.168.99.134:8011/3.mp4" horizontalCenter="0">
</mx:VideoDisplay>
</mx:Application>
森之猎人与弓
11 years, 3 months ago