Main Page About Ldoc+ Error Lists Main Index Index Groups

Ldoc+ Lingo Group:
    DIGITAL VIDEOs

 info D5/601:
      startTime of sprite
 6    8 elements new in Director 6.0,
  !   ? contain Dictionary fixes 601 & 501,
   + 16 miss from the 'Appendix' 6.0 for DIGITAL VIDEO.


#digitalVideo Elements (7):
 6    digitalVideoTimeScale
   +  framesToHMS()
   +  HMStoFrames()
 6 +  onCuePassed [me]
   +  preLoadRAM
   +  quickTimePresent
   +  videoForWindowsPresent

#digitalVideo Member Properties (16):
   +  center             of member
      controller         of member
   +  crop               of member
 6 +  cuePointNames      of member  (test only)
 6 +  cuePointTimes      of member  (test only)
 6    digitalVideoType   of member  (test only)
      directToStage      of member
      duration           of member  (test only)
      fileName           of member  (takes URLs)
      frameRate          of member
      loop               of member
      pausedAtStart      of member
      preLoad            of member
      sound              of member
 6    timeScale          of member  (test only)
      video              of member

#digitalVideo Member Funktions (4):
      trackCount(member)
      trackStartTime(member)
      trackStopTime(member)
      trackType(member)

--

#digitalVideo Sprite Properties (6):
 6 +  currentTime of sprite
      movieRate   of sprite
      movieTime   of sprite
   +  startTime   of sprite
   +  stopTime    of sprite
   +  volume      of sprite

#digitalVideo Sprite Funktions (12):
 6 +  isPassedCuePoint(sprite)
   +  setTrackEnabled(sprite)
      trackEnabled(sprite)
      trackCount(sprite)
      trackNextKeyTime(sprite)
      trackNextSampleTime(sprite)
      trackPreviousKeyTime(sprite)
      trackPreviousSampleTime(sprite)
      trackStartTime(sprite)
      trackStopTime(sprite)
      trackText(sprite)
      trackType(sprite)





[index] _ 601 in 1/97:


directToStage

video member display property

New in the '501 ReadMe':
On Windows, the 'directToStage' property of an .AVI video member CAN be disabled by setting it to FALSE. With this you can use the ink setting of 'background transparent' for that .AVI video sprite, and you also can animate other sprites in front of the video.


1. TIP: No stage update or puppet is needed when changing 'the directToStage' of a video castMember, because all SPRITE appearances of that video MEMBER in your movie are updated immediately and persistently, and you CANNOT use a transition effect for the change. But all changes to a video member will be saved with your movie, unless you reset them manually or in your 'on stopMovie' handler.

2. TIP: Remember: If a video castMember's 'directToStage' property is turned on, it will leave its 'trails' on the screen after finishing, even when changing to another frame without the video sprite in it. QuickTime videos will even leave their 'controller of member' on stage (for a workaround, see 'trails').

3. TIP: According to Gretchen's 501 BugList, if your Lingo moves a QuickTime video onto the stage that is set to 'directToStage' and originally placed outside the stage area, it might NOT play properly.






[index] _ 601 in 1/97:


duration

video or transition member property


1. TIP: The 'duration of member' can be tested AND set, but it will naturally have two totally different meanings when used either with a digital video member or with a transition member.

2. TIP: No stage update or puppet is needed when changing 'the duration' of a video or transition castMember, because all SPRITE appearances of that MEMBER in your movie update immediately and persistently, and you CANNOT use a transition effect for the change. But all changes to a video or transition member will be saved with your movie, unless you reset them manually or in your 'on stopMovie' handler.

3. TIP: Remember: When using transitions, they wipe away any 'trails' left on screen in their changing area.

4. TIP: When playing a digital video, avoid testing for the 'duration of member whichVideoMember' continuously in a frame loop, as this is time consuming and might hinder the video from playing full speed. Instead put 'the duration' (in ticks) of your video member into a variable before and then test that variable.

5. TIP: When playing a video, you should set the 'Frame Properties: Tempo' in the score to a higher value than the 'fps rate' (frames per second, usually 15) of the digital video member. Try to get Director to update the stage fast enough for the video not to drop any frames.

6. TIP: When playing a video, avoid using the tempo channel setting 'Wait for End of Digital Video in Channel: x' or a tight Lingo repeat loop with a repeated 'updateStage' in it, because these two techniques will lock out any user input during their execution; use a frame loop 'go the frame' in your 'on exitFrame' handler instead.

7. TIP: Remember: On Windows, the 'movieRate of sprite' and 'movieTime of sprite' properties of an .AVI video sprite do NOT always return their correct value (see 'the movieRate/movieTime/startTime/stopTime of sprite').


EXAMPLEs:

The following frame script will loop in its frame until 'the movieTime of sprite' has reached 'the duration of member' of the video (alternative: start the timer and check it against the video duration):
on exitFrame
  global gVideoChannel, gVideoDuration
  --
  if NOT (gVideoDuration) then
    set gVideoDuration = the duration of member (the member of sprite gVideoChannel)
    --> startTimer
  end if
  --
  --> if (the timer < gVideoDuration) then...
  --
  if (the movieTime of sprite gVideoChannel < gVideoDuration) then
    go the frame
    exit
  end if
  --
  set the movieRate of sprite gVideoChannel = 0
  set gVideoDuration = FALSE
  --
  --> video finished: go somewhere, do something...
  --
end exitFrame





[index] _ 601 in 1/97:


movieRate

video sprite activity property

5.0 Dictionary Error:
On Windows, the 'movieRate of sprite' property of an .AVI video sprite is NOT reset to 0 when the video finishes playing or is stopped; therefore the 'movieRate' is not a reliable property to work with on Windows (same applies to 'the movieTime of sprite').


1. TIP: According to Gretchen's 501 BugList, setting 'the stopTime' of a QuickTime video sprite works reliably only if 'the movieRate' of that video sprite is 1.

2. TIP: If you want to wind a video on stage which comes from a CD-ROM, do NOT set its 'movieRate' to a higher value than 1, because the processor most likely will not be able to produce more video frames in a second than the 'fps rate' of the video. To simulate the effect of a winding video on stage, use a repeat loop where you set 'the movieTime of sprite x = (the movieTime of sprite x) + 10' (or alike), followed by an 'updateStage' each time. Using this technique will not block the processor.

3. TIP: On Windows, when an .AVI video has finished, it's best to set its 'movieRate = 0' to release Director's grip on that video file.

4. TIP: See 'the duration/movieTime/startTime/stopTime of sprite'.






[index] _ 601 in 1/97:


movieTime

video sprite timing property


1. TIP: On Windows, the 'movieTime of sprite' property of an .AVI video sprite does NOT always correctly return the tested video time in ticks (60th of a second), therefore the 'movieTime' is not a reliable property to work with on Windows (same applies to 'the movieRate of sprite'). 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. (??)

2. TIP: When leaving and later re-entering a frame where the same video plays, best to reset its 'movieTime of sprite' and 'startTime of sprite' to 0 each time to have the video play from its beginning again the next time around (see 'startTime').

3. TIP: If you want to wind a video on stage which comes from a CD-ROM, do NOT set its 'movieRate' to a higher value than 1, because the processor most likely will not be able to produce more video frames in a second than the 'fps rate' of the video. To simulate the effect of a winding video on stage, use a repeat loop where you set 'the movieTime of sprite x = (the movieTime of sprite x) + 10' (or alike), followed by an 'updateStage' each time. Using this technique will not block the processor.






[index] _ 601 in 1/97:


preLoadRAM

digital video memory property

5.0 Dictionary Error:
The Dictionary forgets to mention: 'The DEFAULT setting for this system video property is FALSE (0).'






[index] _ 601 in 1/97:


quickTimePresent

system video property

5.0 Dictionary Errors:
a) The Dictionary: 'When the extension is not present, the quickTimePresent function is FALSE (1)'
Should read: '...is FALSE (0)'
b) The Dictionary's example: 'if the quickTimePresent = 1 then set the movieRate of sprite QTsprite.'
Should read: '...set the movieRate of sprite QTsprite = 1'.

From the '6.0 ReadMe':
QUICKTIME movies cannot be linked from URLs. For Shockwave movies playing in a web browser, QuickTime movies must be placed in the support folder.

From the '601 ReadMe':
Using 'importFileInto()' with an URL-based QUICKTIME movie is now supported.







[index] _ 601 in 1/97:


setTrackEnabled(sprite)

video sprite track function

1. TIP: What is the DEFAULT value for 'setTrackEnabled(sprite)' of a video sprite? I guess it's TRUE...

2. TIP: You might use 'trackCount(sprite)' and 'trackType(sprite)' to check the number and type of tracks of the video sprite before enabling any.






[index] _ 601 in 1/97:


startTime of sprite

undocumented video sprite property

New in the '501 ReadMe':
The 'startTime of sprite' was available in Director 4 and is still valid and necessary in 501, although it's missing in the docs: It determines at how many ticks into the digital video the specified video sprite will start to play. Do NOT use 'trackStartTime(sprite)' or 'trackStartTime(member)' for this purpose, those are different properties, will only deal with a specified single track of the video, and CANNOT be set, and just forget what the "Learning Lingo" tells you about it! The same applies to the undocumented property 'the stopTime of sprite'.


1. TIP: The 'startTime of sprite' property of a digital video sprite can be tested AND set. The value of 'the startTime' is measured in ticks (1 tick = 1/60 second, 1 second = 60 ticks).

2. TIP: The default setting for the 'startTime' video sprite property is 1 (the default starting point of a digital video member). (??)

3. TIP: If the 'loop of member' property of a digital video is turned on, 'the startTime of sprite' is where the video loops back to; if you change its 'startTime' property it will loop there instead of to its beginning.

4. TIP: For best results, start playing the video at one of its keyframes. For instance, a Indeo3.2 video with a setting of 1 keyframe every 4 video frames will have a fully rendered video keyframe in best quality every first out of 4 frames.

5. TIP: When playing a video, you should set the 'Frame Properties: Tempo' in the score to a higher value than the 'fps rate' (frames per second, usually 15) of the digital video member. Try to get Director to update the stage fast enough for the video not to drop any frames.

6. TIP: When playing a video, avoid using the tempo channel setting 'Wait for End of Digital Video in Channel: x' or a tight Lingo repeat loop with a repeated 'updateStage' in it, because these two techniques will lock out any user input during their execution; use a 'go the frame' in your 'on exitFrame' handler instead.

7. TIP: When leaving and later re-entering a frame where the same video plays, best to reset its 'movieTime' and 'the startTime of sprite' to 0 each time to have the video play from its beginning again the next time around.

8. TIP: Remember: On Windows, for an .AVI member (not QT) you CAN set the 'directToStage of member' to FALSE, but you CANNOT have a controller displayed for an .AVI video by setting its 'controller of member' to TRUE, that's only possible for QuickTime (QT) members.

9. TIP: Remember: On Windows, the 'movieRate of sprite' and 'movieTime of sprite' properties of an .AVI video sprite do NOT always return their correct value.

10. TIP: Remember: Special video codecs (short for compression/decompression schemes) like 'Indeo' and 'Cinepak' have their own palette; for best results use the palette from the video for your background graphics when the video plays.


EXAMPLEs:

The following statement starts the digital video sprite in channel 5 at 600 ticks (10 seconds) into the video -- if the video has 15 fps (frames per second), then this would start the video at its 150th frame (but given a keyframe rate of 1:4, this video frame would not be a keyframe):
--
set the startTime of sprite 5 = 10*60
--

For more info, see 'duration', 'movieTime', and 'stopTime'.






[index] _ D5/601 _ 971201:


stopTime of sprite

undocumented video sprite property

New in the '501 ReadMe':
The 'stopTime of sprite' was available in Director 4 and is still valid and necessary in 501, although it's missing in the docs: It determines at how many ticks into the digital video the specified video sprite will stop playing. Do NOT use 'trackStopTime(sprite)' or 'trackStopTime(member)' for this purpose, those are different properties, will only deal with a specified single track of the video, and CANNOT be set, and just forget what the "Learning Lingo" tells you about it! The same applies to the undocumented property 'the startTime of sprite'.


1. TIP: The 'stopTime of sprite' property of a digital video sprite can be tested AND set. The value of 'the stopTime' is measured in ticks (1 tick = 1/60 second, 1 second = 60 ticks).

2. TIP: The default setting for the 'stopTime' video sprite property is the 'duration' of the sprite's video member (the time in ticks from first to last frame of the video). (??)

3. TIP: According to Gretchen's 501 BugList, setting 'the stopTime' of a QuickTime video sprite works reliably only if 'the movieRate' of that video sprite is 1.

4. TIP: If the 'loop of member' property of a digital video is turned on, 'the stopTime of sprite' is where the video will end and jump back to its beginning, or to its changed 'startTime of sprite' property.

5. TIP: For best results, stop playing the video at one of its keyframes. For instance, a Indeo3.2 video with a setting of 1 keyframe every 4 video frames will have a fully rendered video keyframe in best quality every first out of 4 frames.

6. TIP: Remember to reset a movie's 'movieTime' and 'startTime' properties to 0 after having left the frame(s) with the video in it, to ensure the video will start from beginning should you play it again.

7. TIP: On Windows, when an .AVI video has finished, it's best to reset its 'movieRate' to 0 to release Director's grip on that video file. Windows keeps the big System watch cursor up, when your video finishes, but you don'T stop it or remove it from screen (it will leave its 'trails', so you might as well take it away). To avoid the flashing Windows cursor, try to stop the video a couple of ticks before its 'duration' (see 'duration').

8. TIP: From William Donelson 11/97: The order of usage of 'startTime' and 'stopTime' is important and different for Macs and PCs:

PC:   set the startTime of sprite 1 to 100
      set the stopTime  of sprite 1 to 999
      set the movieRate of sprite 1 to 1

Mac:  set the startTime of sprite 1 to 100
      set the movieRate of sprite 1 to 1
      set the stopTime  of sprite 1 to 999 -- otherwise, won't stop!

9. TIP: Remember: If a video's 'directToStage of member' is turned on, it will leave its 'trails' on the screen after finishing, even when changing to another frame without the video sprite in it (for a workaround, see 'trails').

EXAMPLEs:

The following statement stops the digital video sprite in channel 5 at 1200 ticks (20 seconds) into the video -- if the video has 15 fps (frames per second), then this would stop the video at its 300th frame:
--
set the stopTime of sprite 5 = 20*60
--

For more info, see 'duration', 'movieTime', and 'startTime'.






[index] _ 601 in 1/97:


trackEnabled(sprite)

video sprite track property

5.0 Dictionary Error:
The Dictionary: 'This property can be tested and not set.'
Should read: You can test AND set 'trackEnabled(sprite)', as is mentioned on page 109 of the "Learning Lingo" handbook. Why else should it have that name?






[index] _ 601 in 1/97:


trackStartTime(sprite/member)

video sprite track function

5.0 Dictionary Errors:
a) The Dictionary: 'This sprite property gives the starting time of a digital video movie.'
Should read: 'This FUNCTION gives the starting time of a specified TRACK OF a digital video movie'.
b) Correction in the '501 ReadMe': Use 'the startTime of sprite' to test and set the starting point for a video sprite. Do NOT use 'trackStartTime(sprite)' or 'trackStartTime(member)', those are different properties, which will only deal with a specified single track of the video, and CANNOT be set, and just forget what the "Learning Lingo" tells you about it (applies to 'trackStopTime(sprite/member)' as well)! Use 'the startTime of sprite' to test and set the beginning point for a video sprite (see 'startTime of sprite').






[index] _ 601 in 1/97:


trackStopTime(sprite/member)

video sprite and member properties

5.0 Dictionary Error, corrected in the '501 ReadMe':
Do NOT use 'trackStopTime(sprite)' or 'trackStopTime(member)' to determine at how many ticks into the digital video the specified video sprite will stop its playing, those are different properties, which will only deal with a specified single track of the video, and CANNOT be set, and just forget what the "Learning Lingo" tells you about it (applies to 'trackStartTime(sprite/member)' as well)! Use 'the stopTime of sprite' to test and set the ending point for a video sprite (see 'stopTime of sprite').






[index] _ 601 in 1/97:


videoForWindowsPresent

Windows video system property

5.0 Dictionary Error:
The Dictionary's example: 'if the videForWindows = FALSE then go to...' (yes: "videForWindows"!).
Should read: 'if the videoForWindowsPresent = FALSE then go to...'


1. TIP: Besides the above error, my friend Detlef Randerath from www.kontrast.de points out that TRUE or FALSE worked ok in author-time, but not in a projector (from a Windows CD-ROM). He had to use 1 or 0 to get a correct result. BTW: In the Dictionary's example for 'the quickTimePresent' (which is called a 'function'...?) they use 'if the quickTimePresent = 1 then...'

2. TIP: Short forms: 'if (the videoForWindowsPresent) then...', or 'if NOT (the videoForWindowsPresent) then...'





(Top)

URL = "http://www.a3w.de/Lingo/Ldoc_Videos.html"  (971218)

 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