actionscript cuepoint listener for FLV video in flash


/ Published in: ActionScript 3
Save to your folder(s)

basic structure of the actionscript function to listen for cuepoints embedded in a piece of FLV [flash video]. note: cuepoints need to have been embedded when the video was converted from its original format to FLV - prior to importing it into flash


Copy this code and paste it in your HTML
  1. // add an event listener to the video to listen for cuepoints
  2. // in this case the videoclip instance name is 'vid' and the
  3. // function to be triggered by the listener is 'vidstuff'
  4. // if you change the instance name change the code accordingly
  5. this.vid.addEventListener(MetadataEvent.CUE_POINT, vidstuff);
  6.  
  7. // function triggered by the listener when we hit a cuepoint
  8. function vidstuff(event:MetadataEvent):void
  9. {
  10.  
  11. // stuff the function does goes below here
  12.  
  13.  
  14. // stuff the function does goes above here
  15.  
  16. }
  17. // end function triggered by the listener when we hit a cuepoint

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.