Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Cleanup Users Components
Cool Control Button
First Class Text Picture
Set PausedAtStart Property of a Flash member
DriveInfo
DumpSymbol
LiveCD
Set DirectToStage Property of a Flash Sprite
General Purpose MP3 Parent
Set Volume - Buddy API
 

 

 

Behavior getSystemTime

Added on 5/14/2002

 

Compatibilities:
D8 D8_5 Script Shockwave

This item has not yet been rated

Author: mango

Returns hours or minutes or seconds or all together

--usage getSystemTime
--returns a string with one of... full time or hours or minutes or seconds

--getSystemTime(request)
--request, required. Must be a symbol. Valid requests are:
--#all... returns full time in format "hh:mm:ss"
--#h... returns zeropadded string with hours
--#m... returns zeropadded string with minutes
--#s... returns zeropadded string with seconds

--errorcodes
-- -1 = request is not of type symbol
-- -2 = request value is other than valid. see usage

--example:
--put getSystemTime(#all)
-- "00:20:14"
--put getSystemTime(#m)
-- "20"

on getSystemTime request
  if symbolP(request) = 1 then
    tTime = [:]
    t = framestoHMS(the systemdate.seconds,1,0,0).char[2..9]
    tTime.addProp(#all, t)
    tTime.addProp(#h, t.char[1..2])
    tTime.addProp(#m, t.char[4..5])
    tTime.addProp(#s, t.char[7..8])
    if voidp(tTime[request]) then return -2
    return tTime[request]
  else
    return -1
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail