Packagecom.devnet.osmf.controls
Classpublic class SeekBar
InheritanceSeekBar Inheritance MediaControl Inheritance flash.display.MovieClip

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 10.0.0

The SeekBar class creates a visual representation of the media's loading progress and current time position versus total time position. The seek bar can also be used to seek to a position within the video (if the seekEnabled property is set to true).



Public Properties
 PropertyDefined By
  dragging : Boolean
[read-only] True if the scrub handle is currently pressed and dragging.
SeekBar
  handle : SimpleButton
SeekBar
 InheritedmediaPlayer : MediaDisplay
Set the mediaPlayer property to associate a media display instance with a control instance.
MediaControl
  progressBar : Sprite
SeekBar
  scrubBar : Sprite
SeekBar
  seekEnabled : Boolean
Set seekEnabled to true to allow seeking and scrubbing along the seekbar.
SeekBar
  track : Sprite
SeekBar
Public Methods
 MethodDefined By
  
SeekBar
  
init():void
[override] Called when the mediaPlayer reference is set.
SeekBar
  
setProgress(bl:Number, bt:Number):void
Updates the loading progress display on the seek bar.
SeekBar
  
setSeekBar(ct:Number, tt:Number):void
Updates the seek bar position.
SeekBar
  
setSize(w:Number, h:Number):void
Sets the size of the seek bar.
SeekBar
Protected Methods
 MethodDefined By
  
addedToStageHandler(event:Event):void
SeekBar
  
onDragStart(event:MouseEvent):void
SeekBar
  
onDragStop(event:MouseEvent):void
SeekBar
  
onEnterFrame(event:Event):void
SeekBar
  
onTrackClick(event:MouseEvent):void
SeekBar
Events
 Event Summary Defined By
  SeekBar
Property Detail
draggingproperty
dragging:Boolean  [read-only]

True if the scrub handle is currently pressed and dragging.


Implementation
    public function get dragging():Boolean
handleproperty 
public var handle:SimpleButton

progressBarproperty 
public var progressBar:Sprite

scrubBarproperty 
public var scrubBar:Sprite

seekEnabledproperty 
seekEnabled:Boolean

Set seekEnabled to true to allow seeking and scrubbing along the seekbar. Or set to false to disable seeking for progressive video downloads with seeking issues.


Implementation
    public function get seekEnabled():Boolean
    public function set seekEnabled(value:Boolean):void
trackproperty 
public var track:Sprite

Constructor Detail
SeekBar()Constructor
public function SeekBar()



Method Detail
addedToStageHandler()method
protected function addedToStageHandler(event:Event):void

Parameters

event:Event

init()method 
override public function init():void

Called when the mediaPlayer reference is set. Use this method to initialize the control with the OSMF media display.

onDragStart()method 
protected function onDragStart(event:MouseEvent):void

Parameters

event:MouseEvent

onDragStop()method 
protected function onDragStop(event:MouseEvent):void

Parameters

event:MouseEvent

onEnterFrame()method 
protected function onEnterFrame(event:Event):void

Parameters

event:Event

onTrackClick()method 
protected function onTrackClick(event:MouseEvent):void

Parameters

event:MouseEvent

setProgress()method 
public function setProgress(bl:Number, bt:Number):void

Updates the loading progress display on the seek bar.

Parameters

bl:Number — Number representing bytes loaded.
 
bt:Number — Number representing bytes total.

setSeekBar()method 
public function setSeekBar(ct:Number, tt:Number):void

Updates the seek bar position.

Parameters

ct:Number — Number representing the current time.
 
tt:Number — Number representing the total time.

setSize()method 
public function setSize(w:Number, h:Number):void

Sets the size of the seek bar. Currently only the width value is taken into account.

Parameters

w:Number — Number representing the new width.
 
h:Number — Number representing the new height.

Event Detail
change Event
Event Object Type: flash.events.Event