Skip to content

Instantly share code, notes, and snippets.

@ebhoren
Created February 21, 2014 16:04
Show Gist options
  • Save ebhoren/9136971 to your computer and use it in GitHub Desktop.
Save ebhoren/9136971 to your computer and use it in GitHub Desktop.
CuePoints event trigger
var n:int = _$cuePoints.length,
time:Number = _$videoLoader.time,
cuePoint:Object;
while( --n >= 0 )
{
cuePoint = _$cuePoints[n];
if( cuePoint.time > time ) continue;
if( n === _$cuePointsIndex ) break;
_$cuePointsIndex = n;
dispatchEvent( new CuePointEvent( "cuePoint", cuePoint ) );
break;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment