Skip to content

Instantly share code, notes, and snippets.

@davidortinau
Created June 25, 2012 14:20
Show Gist options
  • Save davidortinau/2988926 to your computer and use it in GitHub Desktop.
Save davidortinau/2988926 to your computer and use it in GitHub Desktop.
onVideoPlayheadUpdate handler
protected function onVideoPlayheadUpdate(event:VideoEvent):void
{
var progress:Number = videoDisplay.playheadTime / Number(videoDisplay.metadata.duration);
for (var i:int = 0; i < _actionCues.length; i++)
{
var a:ActionCueVO = ActionCueVO(_actionCues[i]);
var begin:Number = TimecodesAS3.timecodeToSeconds(a.begin);
var end:Number = begin + 0.1;
var current:Number = this.videoDisplay.playheadTime;
if(current >= begin)
{
processAction(a);
_actionCues.shift();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment