FLVPlayback.seekBarInterval

Availability

Flash Player 8.

Edition

Flash Professional 8.

Usage

my_FLVPlybk.seekBarInterval

Description

Property; a number that specifies, in milliseconds, how often to check the seek bar handle when scrubbing. The default value is 250.

Because this interval is set by a call to the global setInterval() function, the update cannot start more frequently than the SWF file frame rate. So, for the default frame rate of 12 frames per second, for example, the lowest effective interval that you can create is approximately 83 milliseconds, or 1 second (1000 milliseconds) divided by 12.

Example

The following example lowers the seekBarInterval setting to 50 milliseconds, and it shows the value of the playheadTime property, if the user is scrubbing.

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:

/**
 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.seek = function(eventObject:Object):Void {
    if(my_FLVPlybk.scrubbing) {
        my_FLVPlybk.seekBarInterval = 50;
        trace("User is scrubbing at: " + eventObject.playheadTime);
    }
};
my_FLVPlybk.addEventListener("seek", listenerObject);

See also

FLVPlayback.seekBar, FLVPlayback.seekBarScrubTolerance