At 12:23 PM -0600 2/13/01, Steffanie Grindle wrote:
>Hey all,
>
>I'm still having trouble with this.  I have been working on trying 
>to get the cue points that I have set to work. Here are the scripts 
>that I'm using to activate my cue points....
>(behavior script)
>global gCurrentCue, gWhichCuePoint
>on exitFrame
>if(isPastCuePoint(sound 1,(getAt(gWhichCuePoint, gCurrentCue)))= 1) then
>go to the frame + 1
>set gCurrentCue=gCurrentCue + 1
>else
>go to the frame
>end if
>end
>
>(Movie script)
>global gWhichCuePoint, gCurrentCue
>on startMovie
>gWhichCuePoint=["recruitment chair","organize", "delegate", "motivate"]
>gCurrentCue=1
>end
>
>These work great for the 1st sound file and the 4 cue points which 
>are set.  They activate just like they are suppose to, but whenever 
>I add the second or third sound files along with their cue point 
>names, nothing happens.  The cues are not activated.  I'm not sure 
>what I'm doing wrong.  Could it be that the cue point is set too 
>close to the beginning of the file?
>

Steffanie,

I use cue points all the time, but in a much more simple and general 
way.  First, there is no need for a movie script - and secondly, 
instead of "polling" for a cue point to see if you have passed it, 
you can be "event driven" and react when you reach a cue point. 
Here's how:

I typically have large sounds kept as external sound files.  These 
sounds are typically kept in a folder called "Sounds".  Then whenever 
I want to start a sound playing, I build the full file name of the 
sound file (based on "the moviePath") and issue a:  sound playFile 1, 
theFullFileName

Then in the next frame in the score where I might want to wait for a 
cue point, I would have a script like this:

   on exitFrame me
     go to the frame
   end

   on cuePassed me
      -- Director calls this handler when a cue point is reached in 
your sound file
     go to the frame + 1
   end

This handles the case where you just want to wait in the score and 
move to the next frame when you hit a cue point.  But if you want to 
keep track of the cuePointNumber and/or name, or you are using 
multiple sound channels, there are other parameters you can specify:

   on cuePassed me, channelID, cuePointnumber, cuePointName
      -- channelID is the sound channel number where the cue point happened
      -- cuePointNumber is just that, the cue point number
      --  cuePointName is the name of the cue point that was reached
      -- you can do whatever you want with these, store them away in 
globals if you wish
    end

Good luck,

Irv
-- 
Lingo / Director / Shockwave development for all occasions.

        (Over two millions lines of Lingo code served!)

[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