User Guide
656 FLVPlayback Component (Flash Professional Only)
See also
FLVPlayback.seekBar, FLVPlayback.seekBarScrubTolerance
FLVPlayback.seekBarScrubTolerance
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
my_FLVPlybk.seekBarScrubTolerance
Description
Property; a number that specifies how far a user can move the SeekBar handle before an
update occurs. The value is specified as a percentage, ranging from 1 to 100. The default value
is 5.
Example
The following example checks to see if the user is scrubbing when a seek event occurs and, if
so, lowers the value of the
seekBarScrubTolerance property to 0 to increase updating the
SeekBar location and the frequency of the
seek event.
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.seekBarScrubTolerance = 0;
trace("User is scrubbing at: " + eventObject.playheadTime);
}
};
my_FLVPlybk.addEventListener("seek", listenerObject);
NOTE
You must grab the handle of the SeekBar, drag it, and release it to cause the event.