To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Online Video

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-28-2006, 11:01 AM   #1
Rain1522
Junior Member
 
Join Date: Aug 2006
Posts: 5
flv custom progress bar

I am trying to reset the progress bar to 0 at each cuePoint. Basically what i am doing is using the playheadupdate and its taking the next cuepoint and subtracting the current to get the total cue time for each. This only works on the fist cuepoint and will not update after that the progress bar will keep growing if you dont set it back to zero.

Hopefully this makes sense to someone , im getting frustrated with it.
Thanks

Code:
import mx.video.*;
var flvPlayer:mx.video.FLVPlayback;
flvPlayer.pauseButton = pauseBtn;
flvPlayer.playButton = playBtn;
flvPlayer.backButton = backBtn;


function paramVal(cp:Object):Void{
//The paramNum is the parameter val with has the number(ex.1 , 2) for each cue
	var paramNum:Number = cp.info.parameters.val;

trace("Cue Number " + paramNum)
	flvPlayer.playheadUpdateInterval = 1;
	var listenerObject:Object = new Object();
	listenerObject.playheadUpdate = function(eventObject2:Object):Void {
playTime.text =  Math.round(eventObject2.playheadTime);
		var totalCueTime:Number = Math.round(flvPlayer.metadata.cuePoints[paramNum].time - flvPlayer.metadata.cuePoints[paramNum - 1].time);
		var playHead:Number = flvPlayer.playheadTime;
		var timeElapse:Number = flvPlayer.playheadTime - flvPlayer.metadata.cuePoints[paramNum -1].time;
		var pctLoaded:Number =  Math.round(timeElapse / totalCueTime * 100);

			progress_mc.barMc._xscale = pctLoaded;
			perCent.text = pctLoaded + " %";
			if(pctLoaded >= 100){
				progress_mc.barMc._xscale = 0;
				}
				
	}


flvPlayer.addEventListener("playheadUpdate", listenerObject);
}
flvPlayer.addEventListener("cuePoint",paramVal);
Rain1522 is offline   Reply With Quote
Old 11-28-2006, 10:49 PM   #2
jjack
Junior Member
 
Join Date: May 2006
Posts: 13
I found somethings about flv controlbar at http://www.**************.com/flv_player/
__________________
knowledge for flash video(flv)
jjack is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Online Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:27 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.