我遇到了大麻烦,有人可以帮我吗??
我的问题是我想在播放外部视频后将我的flashplayer返回到第一帧。
以下脚本用于我的Flash播放器
function checkTime(flv)
{
var _loc2 = flv.playheadTime;
var _loc3 = Math.floor(_loc2 / 60);
var _loc1 = Math.floor(_loc2 % 60);
if (_loc1 < 10)
{
_loc1 = "0" + _loc1;
} // end if
current_time.text = _loc3 + ":" + _loc1;
} // End of the function
flv.pauseButton = pause_btn;
flv.playButton = play_btn;
flv.FLVPlayback.align = center;
var time_interval = setInterval(checkTime, 500, flv);
ffwd_btn.onRelease = function ()
{
flv.seek(flv.playheadTime + 2);
};
rewind_btn.onRelease = function ()
{
flv.seek(flv.playheadTime - 5);
};
mute_btn.onRelease = function ()
{
if (videoSound.getVolume() == 0)
{
videoSound.start();
videoSound.setVolume(volLevel);
}
else
{
volLevel = _root.videoSound.getVolume();
videoSound.setVolume(0);
videoSound.stop();
} // end else if
};
var videoSound = new Sound(this);
videoSound.setVolume(100);
flv.contentPath = flvurl;
fl.video.FLVPlayback.align = center;
如果有人知道请修改脚本并给予回复, 我很期待你的回复......
由于 保罗
答案 0 :(得分:1)
试试这个:
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
gotoAndPlay(0);
};
flv.addEventListener("complete", listenerObject);