Posted By

stiobhart on 06/06/09


Tagged

flash flv video trace actionscript3 college cuepoints


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

johnwun


actionscript3 - trace actions to get info about cuepoints in FLV video


 / Published in: ActionScript 3
 

this is a handy snippet to trace the info about any cuepoints actionscript encounters, embedded in a FLV [flash video]. these traces will display the name, type and time of the cuepoint - in a nicely formatted list

  1. /* ||||||||||||||||| CUEPOINT TRACES ||||||||||||||||||||
  2. these trace actions are handy for returning the info that flash has about any cuepoints it encounters, embedded in an FLV [flash video] file. put these traces inside a cuepoint listener function to test whether flash is picking up the cuepoints in the first place, before you add any more complicated code. these traces will display:
  3.  
  4. - the 'event' the listener has detected [ie. a cuepoint]
  5. - the name of the cuepoint
  6. - the type of the cuepoint [ie. 'event' or 'navigation']
  7. - the time the cuepoint sits at in the video
  8.  
  9. [note: this code assumes your FLV video file has an instance name of 'vid'. if you change the instance name change the "this.vid.playheadTime" part of the code accordingly]
  10.  
  11. this is the same trace code i demo'd in class. i've just tidied it up a bit by adding in a few tabs [\t] and a linebreak [\n]at the end, so it formats up neater. i cannae help it - i'm just such a perfectionist!
  12. ||||||||||||||||||||||||||||||||||||||||||| */
  13.  
  14. // begin traces
  15. trace("listener detected: \t"+event.type);
  16. trace("cuepoint is called: \t"+event.info.name);
  17. trace("cuepoint is of type: \t"+event.info.type);
  18. trace("vid playhead time: \t"+this.vid.playheadTime);
  19. trace("------\n");
  20. // end traces

Report this snippet  

You need to login to post a comment.