Open the Flash file that contains your FLVPlayback component. In this example, the FLVPlayback component has been assigned the name "VideoPlayerA."
Play your video and decide on the video frame(s) you want to access through your video interface. Use the cue point naming features offered through Flash's integrated development environment to select the video frame and assign a cue point name. For this example, one cue point is selected. It is named "Sun Setting."
Click "Actions" to open up the ActionScript 3 editor to view the FLVPlayBack code. Type into the editor the code to find the exact time (in seconds) that the "Sun Setting" cue point occurs in the video. Attach the "findCuePoint" method to the VideoPlayerA FLVPlayback method to find the time. Specify the cue point name "Sun Setting" as the cue point argument for the "findCuePoint" method. Store the found time in an object named "cuePointSettingSun."
var cuePointSetingSun:Object = VideoPlayerA.findCuePoint("Sun Seting");
Type into editor, starting on the next line of the ActionScript 3 editor, the code to create a button named "FindSettingSun:"
FindSettingSun.graphics.lineStyle(4);
FindSettingSun.graphics.beginFill(0xFF0000);
FindSettingSun.graphics.drawRect(0, 0 , 50, 20);
FindSettingSun.graphics.endFill();
stage.addChild(myButton);
The code draws a red rectangular button (50 by 20 pixels) at the upper left hand corner of the computer screen.
Type, starting on the next line of the ActionScript 3 editor, the event handler that will respond to a mouse click on the "FindSettingSunButton" button. Use the FLVPlayback component's seek method within the code of the event handler's function to move the video playhead to the time property stored in the cuePointSettingSun object (the time the Setting Sun cue point occurs in the video).
FindSettingSunButton.addEventListener(MouseEvent.CLICK, seekSetingSun_fn);
function seekSettingSun_fn(event:MouseEvent):void
{
VideoPlayerA.seek(cuePointSetingSun.time); ;
}
This event handler code will place the video playhead at the time the "Setting Sun" cue point occurs after the FindSettingSunButton has been clicked.