Packagecom.devnet.osmf.controls
Classpublic class ElapsedTime
InheritanceElapsedTime Inheritance MediaControl Inheritance flash.display.MovieClip

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

The ElapsedTime class displays current time and total time in the 00:00 / 00:00 format.



Public Properties
 PropertyDefined By
  currentTime : Number
Sets the current time value (in seconds) and forces an update to the time display.
ElapsedTime
 InheritedmediaPlayer : MediaDisplay
Set the mediaPlayer property to associate a media display instance with a control instance.
MediaControl
  timeText : TextField
ElapsedTime
  totalTime : Number
Sets the total time value (in seconds) and forces an update to the time display.
ElapsedTime
Public Methods
 MethodDefined By
  
ElapsedTime
  
getTime(sec:Number):String
Returns the formatted time from seconds (00:00 / 00:00).
ElapsedTime
  
init():void
[override] Called when the mediaPlayer reference is set.
ElapsedTime
Property Detail
currentTimeproperty
currentTime:Number

Sets the current time value (in seconds) and forces an update to the time display.


Implementation
    public function get currentTime():Number
    public function set currentTime(value:Number):void
timeTextproperty 
public var timeText:TextField

totalTimeproperty 
totalTime:Number

Sets the total time value (in seconds) and forces an update to the time display.


Implementation
    public function get totalTime():Number
    public function set totalTime(value:Number):void
Constructor Detail
ElapsedTime()Constructor
public function ElapsedTime()



Method Detail
getTime()method
public function getTime(sec:Number):String

Returns the formatted time from seconds (00:00 / 00:00).

Parameters

sec:Number — Number of seconds to format.

Returns
String — Formatted String.
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.