FLVPlayback.scrubStart

Availability

Flash Player 8.

Edition

Flash Professional 8.

Usage

var listenerObject:Object = new Object();
listenerObject.scrubStart = function(eventObject:Object):Void {
    // insert event-handling code here
};
my_FLVplybk.addEventListener("scrubStart", listenerObject);

Description

Event; dispatched when then user begins scrubbing the FLV file with the SeekBar. Scrubbing refers to grabbing the handle of the SeekBar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing begins when the user clicks on the SeekBar handle and ends when the user releases it.

The event object has the properties state and playheadTime.

The component also dispatches the stateChange event with the state property equal to "seeking". The state remains "seeking" until the user stops scrubbing.

Example

The following example listens for the scrubStart event and shows the time when scrubbing begins.

Drag an FLVPlayback component to the Stage, and give it an instance name of my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the Timeline:

NOTE

You must grab the handle of the SeekBar and drag it to cause the event.

/**
 Requires:
  - FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
var listenerObject:Object = new Object();
listenerObject.scrubStart = function(eventObject:Object):Void {
    trace("Scrubbing began at " + eventObject.playheadTime);
};
my_FLVPlybk.addEventListener("scrubStart", listenerObject);

See also

FLVPlayback.playheadTime, FLVPlayback.scrubbing, FLVPlayback.scrubFinish, FLVPlayback.seekBar, FLVPlayback.state, FLVPlayback.stateChange