ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.seekBarScrubTolerance | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.seekBarScrubTolerance
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.
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:
|
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.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);
FLVPlayback.scrubbing, FLVPlayback.scrubFinish, FLVPlayback.scrubStart, FLVPlayback.seekBar, FLVPlayback.seekBarInterval
|
|
|
|