Response to:

> >How is it possible to control the timeline of a
> >quicktime movie. So that I could show some graphics at after certain 
>intervals
> >of time related to what is being shown in
> >the quicktime movie at that particular instance of
> >time.
>
>Either using cue points (look them up) or by checking the movieTime
>property of the sprite - which one you use depends on your programming
>method/preference.

=============================

In regard to displaying graphics which correspond to QT movies, I thought 
I'd share a bit of experience with a project I worked on last year during 
which we explored BOTH options of sync (cuepoints AND lingo movieTime 
property).

The project contained several educational music videos.  During the videos, 
when the lyrics of the song mentioned certain things, text/graphic "bullet 
points" appeared in a window under the video, which were intended to 
emphasize key learning elements of the song for subsequent testing.

I was familiar with the concept of cuepoints, but had never used them 
before.  The Director documentation made them sound pretty straight forward, 
using SoundEdit16 to set them, etc.  Perhaps it is a simple procedure for 
audio files, but it's a bit trickier for QT files!

First, you have to set the cuepoints in SoundEdit.  Next, you have to open 
the file in QT MoviePlayer Pro and enable the text track and cache hint for 
the file.  Finally, you have to re-save the QT as a self-contained movie.

I did almost all of the Director development for this project on the Mac.  I 
soon discovered that when I took these cuepointed, text-track-enabled, 
self-contained QT movies onto the Windows platform, D8 for Win did not 
recognize the cuepoints!  Sooo, the text track enabling and re-saving as a 
self-contained movie had to be performed AGAIN on the Windows side with 
MoviePlayer Pro.  Don't know if this is common or a glitch on our system.

This project was about four months total (there were MANY other elements 
involved!), and this portion was one of the first things we did.  All was 
good and well and the graphics were synched perfectly to the QT, so we moved 
on to the other parts of the project.  About 6 weeks later, seemingly out of 
the blue, the cuepoints just stopped working.  This phenomenon plagued the 
project for the next couple of weeks, with many resetting of cuepoints and 
many recompressions of the files.  Our video editor/graphic designer 
ventured a guess that the video files were becoming spontaneously corrupted, 
and at one point, he had to recompress the original video files (he either 
used Media100 or Cleaner5, w/ Sorenson, 320x240, 15fps, 110k/s datarate) and 
start from scratch setting cuepoints on two of the videos.

(pause for comentary)  It was during this relative time period that I began 
abandoning Director's score-based animation and navigation techniques and 
getting into Lingo pretty heavily.  For those of you who haven't made this 
jump yet, DO IT.  DO IT NOW!!  Nearly anything you can do by stretching a 
sprite out over several frames you can do with Lingo, using single-frame 
animation loops and behaviours.  It offers more flexibility, more control, 
and makes adjustments in animations much easier and user-controllable.  
(commentary complete)

Finally, [Lingo] came to the rescue!  The first step was to use 
[isPastCuePoint] in conjunction with [put sprite(1).movieTime] (sprite(1) 
being the QT sprite) to gather the movieTime values in ticks for each 
cuepoint.  There were potentially several methods by which to display the 
text/graphic bullet points (i.e. switch cast members, move graphics on and 
off stage, stretch movie over several frames and jump around, etc.), but the 
method I chose was to layer all of the text/graphics one on top of the other 
and attach this behaviour to each:
[
on beginSprite me
  sprite(me.spriteNum).visible = FALSE
end
]
Then, the QT movie was contained in a single frame, with a frame script 
something like this, where sprite(1) is the QT sprite and sprites 5, 6 & 7 
are the text/graphic sprites (in the actual project, there were about 15-20 
graphics per video, so the scripts were actually quite lengthy . . . but 
effective!!):
[
on exitFrame
  if sprite(1).movieTime < 100 then
    sprite(5).visible = FALSE -- before 100 ticks, all sprites are OFF
    sprite(6).visible = FALSE
    sprite(7).visible = FALSE
  else if sprite(1).movieTime >= 100 and sprite(1).movieTime < 500 then
    sprite(5).visible = TRUE -- sprite(5) ON for this period of ticks
    sprite(6).visible = FALSE
    sprite(7).visible = FALSE
  else if sprite(1).movieTime >= 500 and sprite(1).movieTime < 700 then
    sprite(5).visible = FALSE -- all sprites OFF during this period
    sprite(6).visible = FALSE
    sprite(7).visible = FALSE
  else if sprite(1).movieTime >= 700 and sprite(1).movieTime < 1100 then
    sprite(5).visible = FALSE
    sprite(6).visible = TRUE -- sprite(6) ON for this period of ticks
    sprite(7).visible = FALSE

  else if sprite(1).movieTime >= 1100 and sprite(1).movieTime < 1300 then
    sprite(5).visible = FALSE - all sprites OFF during this period
    sprite(6).visible = FALSE
    sprite(7).visible = FALSE
  else if sprite(1).movieTime >= 1300 and sprite(1).movieTime < 1700 then
    sprite(5).visible =  FALSE
    sprite(6).visible = FALSE
    sprite(7).visible = TRUE - sprite(7) ON for this period of ticks
  else if sprite(1).movieTime >= 1700 and sprite(1).movieTime <= 2000 then
    sprite(5).visible = FALSE - all sprites OFF during this period until end 
of QT
    sprite(6).visible = FALSE
    sprite(7).visible = FALSE
end if
go to the frame
end
]

Looking back on this script, even now I presume there are better ways to 
handle this type of situation, I'd love to get feedback on it!  The idea 
behind isolating each time period with it's own [else if] section of script 
had to do mostly with allowing the user to use the QT progress bar to jump 
around in the QT and still ensure the correct text/graphic was displayed.

We also ran into the white flash issue on this project, as mentioned 
elsewhere in this original post.  Each of these music videos had a 30-second 
"introduction" QT which played immediately prior to each one.  It's been 
awhile now, but I believe the way we addressed this was as follows:

1) Put QT #1 in frame 1 and play it.  Use [movieTime] to check where you're 
at in QT#1 and jump to the next frame on fade to black (allow a couple of 
ticks lag time).
2) Put QT#2 in frames 2 & 3.  In frame 2, QT#2 is at a location off the 
stage.  In it's place, in the QT frame where it is to be displayed, place a 
black sprite of the same size as the QT.  Use [movieTime] to check where 
you're at in QT#2 and jump to the next frame a couple of ticks in (after 
QT#2 has started and passed the point of the "flash")
3) Now you're in frame 3, where the black sprite is gone and QT#2 is in it's 
place, in the QT frame.  This assumes a fade from black on QT#2 of a second 
or two.

New to the list, I'm enjoying it thoroughly and have learned MANY new tricks 
already.

Sincerely
Kush'pa


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to