Packageorg.as3lib.kitchensync.utils
Classpublic class TimeStringParser_en
ImplementsITimeStringParser

Parses a time string into milliseconds.



Public Methods
 MethodDefined by
  
TimeStringParser_en
  
parseTimeString(timeString:String):int
Parses a string into milliseconds.
TimeStringParser_en
Public Constants
 ConstantDefined by
  DAYS_VALUE : Number = 86400000
[static]
TimeStringParser_en
  HOURS_VALUE : Number = 3600000
[static]
TimeStringParser_en
  MILLISECONDS_VALUE : Number = 1
[static]
TimeStringParser_en
  MINUTES_VALUE : Number = 60000
[static]
TimeStringParser_en
  SECONDS_VALUE : Number = 1000
[static]
TimeStringParser_en
Protected Constants
 ConstantDefined by
  DAYS_SEARCH : RegExp
[static]
TimeStringParser_en
  FRAMES_SEARCH : RegExp
[static]
TimeStringParser_en
  HOURS_SEARCH : RegExp
[static]
TimeStringParser_en
  LETTER_SEARCH : RegExp
[static]
TimeStringParser_en
  MILLISECONDS_SEARCH : RegExp
[static]
TimeStringParser_en
  MINUTES_SEARCH : RegExp
[static]
TimeStringParser_en
  NUMBER_SEARCH : RegExp
[static]
TimeStringParser_en
  NUMBER_UNIT_PAIR_SEARCH : RegExp
[static]
TimeStringParser_en
  SECONDS_SEARCH : RegExp
[static]
TimeStringParser_en
  TIMECODE_DIGIT_SEARCH : RegExp
[static]
TimeStringParser_en
  TIMECODE_FORMAT_SEARCH : RegExp
[static]
TimeStringParser_en
  TIMECODE_FRAME_SEARCH : RegExp
[static]
TimeStringParser_en
  TIMECODE_SEGMENT_SEARCH : RegExp
[static]
TimeStringParser_en
Constructor detail
TimeStringParser_en()constructor
public function TimeStringParser_en()
Method detail
parseTimeString()method
public function parseTimeString(timeString:String):int

Parses a string into milliseconds. Times can use multiple units. Each unit should be separated by a comma or a space. Units will only be detected if they are placed after the time value. All times will be returned in milliseconds. If no time unit is specified, the result will use null for the time unit and the synchronized action will use its default. These are all valid options: "1 hour, 2 minutes, 3 seconds, 4 milliseconds" "1h2m3s4ms" "5sec,12fr" "01:23:45;15" (1h, 23m, 45s, 15f - frames are based on stage's framerate) ":03" (3s) "300 frames" "1.25s" "5 milliseconds, 15mins, 6 hrs" "0.25 days"

Parameters
timeString:String — - a string representing some ammount of time.

Returns
int — An int containing the time in milliseconds
Constant detail
DAYS_SEARCHconstant
protected static const DAYS_SEARCH:RegExp
DAYS_VALUEconstant 
public static const DAYS_VALUE:Number = 86400000
FRAMES_SEARCHconstant 
protected static const FRAMES_SEARCH:RegExp
HOURS_SEARCHconstant 
protected static const HOURS_SEARCH:RegExp
HOURS_VALUEconstant 
public static const HOURS_VALUE:Number = 3600000
LETTER_SEARCHconstant 
protected static const LETTER_SEARCH:RegExp
MILLISECONDS_SEARCHconstant 
protected static const MILLISECONDS_SEARCH:RegExp
MILLISECONDS_VALUEconstant 
public static const MILLISECONDS_VALUE:Number = 1
MINUTES_SEARCHconstant 
protected static const MINUTES_SEARCH:RegExp
MINUTES_VALUEconstant 
public static const MINUTES_VALUE:Number = 60000
NUMBER_SEARCHconstant 
protected static const NUMBER_SEARCH:RegExp
NUMBER_UNIT_PAIR_SEARCHconstant 
protected static const NUMBER_UNIT_PAIR_SEARCH:RegExp
SECONDS_SEARCHconstant 
protected static const SECONDS_SEARCH:RegExp
SECONDS_VALUEconstant 
public static const SECONDS_VALUE:Number = 1000
TIMECODE_DIGIT_SEARCHconstant 
protected static const TIMECODE_DIGIT_SEARCH:RegExp
TIMECODE_FORMAT_SEARCHconstant 
protected static const TIMECODE_FORMAT_SEARCH:RegExp
TIMECODE_FRAME_SEARCHconstant 
protected static const TIMECODE_FRAME_SEARCH:RegExp
TIMECODE_SEGMENT_SEARCHconstant 
protected static const TIMECODE_SEGMENT_SEARCH:RegExp