Created
June 25, 2012 14:20
-
-
Save davidortinau/2988926 to your computer and use it in GitHub Desktop.
onVideoPlayheadUpdate handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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