Last active
August 29, 2015 14:19
-
-
Save mattlundstrom/8c45ac52b71791db5505 to your computer and use it in GitHub Desktop.
Dirty Video Listener 2
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
| // Cuepoints for non flvs | |
| var dirtyVideoListerner:Function = function (_ns:NetStream, _time:Number, _func:Function):void | |
| { | |
| this.addEventListener(Event.ENTER_FRAME, checkTime); | |
| var callingMC:MovieClip = this; | |
| function checkTime():void | |
| { | |
| if (_ns.time > _time) | |
| { | |
| _func(); | |
| cancel(); | |
| } | |
| } | |
| function cancel() | |
| { | |
| callingMC.removeEventListener(Event.ENTER_FRAME, arguments.callee); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment