Listen for a Flash Video's cue points with VideoDisplay
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
import mx.events.CuePointEvent;
[Bindable]
private var arrColl:ArrayCollection = new ArrayCollection();
private function doCuePoint(evt:CuePointEvent):void {
arrColl.addItem({type:evt.type,
cuePointName:evt.cuePointName,
cuePointTime:evt.cuePointTime,
cuePointType:evt.cuePointType});
}
</mx:Script>
<mx:VideoDisplay id="vid" autoPlay="true" source="http://s.com/s.flv" cuePoint="doCuePoint(event);"/>
<mx:DataGrid id="dataGrid" dataProvider="{arrColl}" width="400" rowCount="5">
<mx:columns>
<mx:DataGridColumn id="typeCol" dataField="type" />
<mx:DataGridColumn id="cuePointNameCol" dataField="cuePointName" />
<mx:DataGridColumn id="cuePointTimeCol" dataField="cuePointTime" textAlign="right" />
<mx:DataGridColumn id="cuePointTypeCol" dataField="cuePointType" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
Related examples in the same category