Reputation: 67
Im in a big trouble, can any one help me please..?
My problem is I want to return my flashplayer into first frame after playing the external video.
The following script is used for my flash player,
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;
If anyone knows please modify the script and give reply, I'm looking forward to your replies..
Thanks Paul
Upvotes: 0
Views: 1492
Reputation: 541
Try this:
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
gotoAndPlay(0);
};
flv.addEventListener("complete", listenerObject);
Upvotes: 1