Main Page About Ldoc+ Error Lists Main Index Index Groups

Ldoc+ Lingo Group:
    TIMINGS / IDLE

 info D5/601:
      timeoutLapsed
      ticksToString()
 6    1 elements new in Director 6.0, nothing changed,
  !   2 contain Dictionary fixes 601 & 501,
   + 11 miss from the 'Appendix' 6.0 for TIME.
   +  NO 'Appendix' in 6.0 for IDLE, but included in MEMORY.


Timing Elements (12):
 6 +  CPUhogTicks
      date
      delay()
      framesToHMS()
   +  frameTempo
      HMStoFrames()
   +  puppetTempo
      startTimer
      ticks
      time
      timer
   +  timeScale of member (#digitalVideo)
      ...see also the VIDEOS Lingo Group.

TimeOut Properties (11):
   +  lastClick
   +  lastEvent
   +  lastKey
   +  lastRoll
   +  on timeOut (event handler)
      timeoutKeyDown
  !   timeoutLapsed (settable)
   +  timeoutLength
      timeoutMouse
   +  timeoutPlay
      timeoutScript

Idle Elements (9):
      cancelIdleLoad()
      finishIdleLoad()
      idleHandlerPeriod
      idleLoadDone()
   +  idleLoadMode
   +  idleLoadPeriod
      idleLoadTag
  !   idleReadChunkSize
   +  on idle (event handler)





[index] _ D5/601 _ 970606:


CPUhogTicks

secret 5.0 Director system property, official in 6.0

TIP: According to Andreas Viviani's unLingo Dictionary, the undocumented property 'the CPUhogTicks' determines the number of ticks Director can reserve processor time before other programs may come in. You can test AND set 'the CPUhogTicks', the default is 20 ticks. Increasing this property can be useful to enhance the performance of stand-alone projects. But as the 'CPUhogTicks' is undocumented, use it at your own risk, and possibly it won't be valid in the next update of Director.






[index] _ 601 in 1/97:


idleLoadMode

basic idle preloading property

1. TIP: The default setting for your project's 'idleLoadMode' property is 0. This means that any 'preLoad' or 'preLoadMember' command you give is executed at once, and might cause a delay in your movie. If you change the setting of 'the idleLoadMode' to 1, 2, or 3, all of your preloading will ONLY take place during the movie's idle time.

2. TIP: Remember the '5.0 ReadMe': Director can idle load castMembers from an internal or external castLib. However, it cannot idle load linked castMembers. Members that were idle loaded remain compressed in memory until the movie uses them. When the movie plays back, it may have noticeable pauses if it decompresses a large number of members at the same time.






[index] _ 601 in 1/97:


idleReadChunkSize

basic idle preloading property

5.0 Dictionary Errors:
a) The Dictionary's syntax: 'the idleReadChunkSize of member whichcastMember'. But that produces an error alert!
Correct syntax: 'the idleReadChunkSize', as this is a basic property for Director, and not a property of a member.
b) The Dictionary does NOT mention the default size for the movie property 'the idleReadChunkSize'.
...should read:
The default setting for 'the idleReadChunkSize' (for castMembers included in the idle preload queue) is 32,768 bytes (32k): 'put the idleReadChunkSize -- 32768'.


TIP: Remember the '5.0 ReadMe': castMembers that were idle loaded remain compressed in memory until the movie uses them. When the movie plays back, it may have noticeable pauses if it decompresses a large number of members at the same time.






[index] _ D5/601 _ 971201:


puppetTempo

movie tempo controlling command

6.0 Dictionary Error, same in 5.0:
" The maximum frames per second is 60. "
...should read:
" The maximum frames per second is 120. "
...120 fps are the same maximum as in the 'Frame Properties: Tempo' dialog box.

1. TIP: No stage update needed, as 'puppetTempo' only makes sense for a moving playback head anyway. Any occurance of 'go the frame' or 'go someFrameNameOrNumber' will reset the movie's tempo back to a value set in the tempo channel in or before the new frame.

2. TIP: No 'puppetTempo 0' needed to turn it off (is mentioned). This means that the tempo channel CANNOT really be puppetized persistently: As soon as the playback head reaches a frame with a tempo setting in the tempo channel or with a 'go someFrame' script, it will override any given 'puppetTempo' command.

3. TIP: If you use 'puppetTempo' with values higher than 120, you might get unpredictable results. You CANNOT set the tempo to 0, you have to use the 'pause' command instead, but better leave the tempo at an average of 10 to 15 (and have a frame loop with 'go the frame') to let Director check for system events like mouse clicks.

--

EXAMPLEs:

Using the following lines, you can turn the tempo of the playback head up to full throttle, depending on how long the user hasn't clicked the mouse:
set myClickTime = the lastClick
--
if (myClickTime > 119*60) then
  puppetTempo 120
--
else puppetTempo (clickTime / 60 + 1)





[index] _ 601 in 1/97:


timer

system stopwatch property

5.0 Dictionary Error:
" set the timer = startTicks "
...should read:
" set startTicks = the timer "
...although you could also set 'the timer'. But why?


1. TIP: The 'timer' property can be tested AND set, it starts automatically counting the ticks as soon as Director or your projector starts, and again everytime you issue a 'startTimer' command.

2. TIP: It's known that Windows 3.1x does NOT report back 'the ticks' sixty times a second, but only 10 times a second or so. Take this into consideration when you test any ticks or the running timer on Windows 3.1. (??)


EXAMPLEs:

The following function (handler) will calculate any amount of ticks and return a string in the form of 'xx:xx:xx' (hours:minutes:seconds). If the amount of ticks is 60, the string will be '00:00:01'. Call this self-made function with: 'ticksToString(the timer)' or other ticks:
on ticksToString myTicks 
  --
  set mySeconds = (myTicks /   (60)    ) mod 60
  set myMinutes = (myTicks /  (60*60)  ) mod 60
  set myHours   = (myTicks / (60*60*60)) mod 60
  --
  if (mySeconds < 10) then put "0" before mySeconds
  if (myMinutes < 10) then put "0" before myMinutes
  if (myHours   < 10) then put "0" before myHours
  --
  return (myHours &":"& myMinutes &":"& mySeconds)
  --
end ticksToString

--> Use it like:
--
set myTimeString = ticksToString(the ticks)

--> or:
--
put ticksToString(the movieTime of sprite x) into field "Video Time"

...but remember: It's very time consuming to constantly update a field member! Better do that only once a second (and no 'puppet' or 'updateStage' is needed).






[index] _ 601 in 1/97:


timeoutLapsed

system timeout stopwatch property

5.0 Dictionary Error:
" The timeoutLapsed property can be tested, but not set directly in Lingo. "
...should read:
" The timeoutLapsed property can be tested AND set. "
...no problem.


1. TIP: To avoid a timeout occuring during an already playing timeout action of yours, use 'set the timeoutLapsed = 0' (repeatedly) during the timeout action (e.g. an animation) to rewind Lingo's 'timeoutLapsed' stopwatch, and to prevent another timeout event from occuring right in the middle of your playing timeout action (animation) and thus restarting it.

2. TIP: On my Mac 68K, when using external castLibs, I definitely have to issue a 'set the timeoutScript = "myHandlerName()"' from a script which is placed in the internal castLib to get it to work. If this command is issued in an external script, 'the timeoutScript' will be set, but emptied ("") straightly after. God knows why... ;)





(Top)

URL = "http://www.a3w.de/Lingo/Ldoc_Timings.html"  (971212)

 Top [Main Page] [About...] [Error Lists] [Ldoc+ Index] [Lingo Groups]
The Ldoc+ © Copyright 97-98 by Denis Wieger Online since June 1, 1997. All rights reserved.
<mailto:Denis@a3w.de>
 Top