3 Replies Latest reply on Jun 9, 2010 6:34 AM by nchunga

    How to add Actionscript cuepoints in the latest version?


      I can't figure out how to add  Actionscript cuepoints...I see some documentation from November 2009  online but it doesn't match the OSMF docs online for Sprint 10.


      I seem to be  able to add a cuepoint by writing:


      var cuePoint:CuePoint = new  CuePoint(CuePointType.ACTIONSCRIPT, 1, "good point", null);


      videoElement.addEventListener(MediaElementEvent.METADATA_ADD,  onMetadataAdd);


      But when I take these two functions from the OSMF online  docs:


      private  function onMetadataAdd(event:MediaElementEvent):void
                   if (event.namespaceURL == CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE)
                      var timelineMetadata:TimelineMetadata =  videoElement.getMetadata(CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE) as  TimelineMetadata;
                       timelineMetadata.addEventListener(TimelineMetadataEvent.MARKER_TIME_REACHED,  onCuePoint);


              private function  onCuePoint(event:TimelineMetadataEvent):void
                   var cuePoint:CuePoint = event.marker as CuePoint;
                   trace("Cue Point at " + cuePoint.time);



      I'm not  getting any trace message at 1 second into the video?