-
1. Re: How can I save a video's position using the FLVPlayback component
kglad Feb 8, 2010 7:40 AM (in response to Webshark2000)use the playheadUpdate listener's eventobject's playheadTime property:
var flvUpdateObj:Object = new Object();
flvUpdateObj.playheadUpdate = function(eobj:Object):Void {
trace(playheadupdate"+eobj.target+": "+eobj.playheadTime);
};yourcomponent.playheadUpdateInterval = 500;
yourcomponent.addEventListener("playheadUpdate", flvUpdateObj); -
2. Re: How can I save a video's position using the FLVPlayback component
Webshark2000 Feb 8, 2010 7:40 AM (in response to kglad)Thanks kglad, that's exactly what I needed.
-
3. Re: How can I save a video's position using the FLVPlayback component
kglad Feb 8, 2010 7:44 AM (in response to Webshark2000)actually, that's helpful only if you were using as2. in as3, it's easier:
use the flvplayback's playheadTime property:
trace(yourcomponent.playheadTime);
// you'll need to save that (using sharedobject) periodically so you might want to use a VideoEvent.PLAYHEAD_UPDATE event.
-
4. Re: How can I save a video's position using the FLVPlayback component
dmeN Feb 8, 2010 7:46 AM (in response to Webshark2000)I believe playheadTime should do what you need. Check the Help for the FLV playback component...
-
5. Re: How can I save a video's position using the FLVPlayback component
Webshark2000 Feb 8, 2010 11:46 AM (in response to kglad)This is what I ended up doing. I put the FLVPlayback inside a movieclip and put this on the first frame:
stop();
var vidTime:Number=0;
on the frame that the video plays on I have the video and a close button (which is a movieclip) and I put the following script:
...
if(vidTime>0)
{
htMeasVid.seek(vidTime);
}close_btn.addEventListener(Event.ENTER_FRAME, seekCount);
close_btn.addEventListener(MouseEvent.MOUSE_UP, closeBtnUp);
function seekCount(e:Event):void
{
vidTime=htMeasVid.playheadTime;
}function closeBtnUp(e:MouseEvent):void
{
e.currentTarget.parent.play();
}on the following frame I have this code:
close_btn.removeEventListener(Event.ENTER_FRAME, seekCount);
htMeasVid.stop();
and then on the last frame I have this:
gotoAndStop(2);
so that it doesn't reset the vidTime variable to 0.
Thanks again for the help.
-
6. Re: How can I save a video's position using the FLVPlayback component
kglad Feb 8, 2010 12:00 PM (in response to Webshark2000)you're welcome.




