FLVPlayback.scrubFinish

Availability

Flash Player 8.

Edition

Flash Professional 8.

Usage

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

Description

Event; dispatched when the user stops scrubbing the FLV file with the SeekBar. Scrubbing refers to grabbing the handle of the seek bar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing stops when the user releases the handle of the SeekBar.

The event object has the properties state and playheadTime. The state will be "seeking" until after scrubbing stops.

The component also dispatches the stateChange event with the state property equal to the new state, which should be "playing", "paused", "stopped", or "buffering".

Example

The following example listens for the scrubFinish event and shows the time at which scrubbing stops.

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, drag it, and release 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.scrubFinish = function(eventObject:Object):Void {
    trace("Scrubbing stopped at " + eventObject.playheadTime);
    trace("Current state is " + eventObject.state);
};
my_FLVPlybk.addEventListener("scrubFinish", listenerObject);

See also

FLVPlayback.playheadTime, FLVPlayback.seek, FLVPlayback.seekBar, FLVPlayback.scrubStart, FLVPlayback.state, FLVPlayback.stateChange