[EMAIL PROTECTED] wrote:
> I'm building a presentation on a Mac with Dir 7.0. I put cue points in
> my sound using SoundEdit 16 ... the timing seems to really throw off
> the animation ... sometimes it works, sometimes it doesn't ...
>
> any suggestions?
> is using lingo-controlled cue points better for this?
Hi Tanya
I agree. Cue points work hardly - for my personal experiences. But there's a
workaround. Use "the timer" to record time and a field to set your own
"cuepoints", here's how it works:
1. Create a field [named: TALK_WORKFLOW] and set a dummy list of
milliseconds, for instance:
[650,1070,1600, 2000, 2830, 3455]
--
2. Create a field [TALK_WORKFLOW_TEXT] and set some text on every line:
Cue 1
Cue 2
Cue 3
--
3. Create start movie handler:
on startMovie me
startTimer
end
--
4. Create a behavior:
-- Danger, email lingo ahead...
-- Cue Point Behavior
property pBusy, pActionSprite
property pTalkerText
property pTimer, pTimerDifference
property pSoundLength
property pCueList, pCueListCount, pCurrentCue
on beginSprite me
me.pActionSprite = the spriteNum of me
me.pBusy = FALSE
me.pCurrentCue = 0
me.pCueList = []
me.pCueListCount = 0
end
on makeCueTimerObj me, thisTalkerSymbol, thisTalkerText, thisSoundFile
case (me.pBusy) of
FALSE:
me.pTalkerText = thisTalkerText
me.pCueList = value (field(member thisTalkerSymbol))
me.pCueListCount = me.pCueList.count
me.pCurrentCue = 1
-- Cause sound files comes with duration value in milliseconds
-- convert to ticks...
kMilliseconds = member(thisSoundFile, "UISounds").duration
me.pSoundLength = integer(kMilliseconds/16.66666666666666)
-- show results in message window...
put "Text is: " & line me.pCurrentCue of \
field (member me.pTalkerText)
-- track timing...
me.pTimerDifference = the timer
me.pBusy = TRUE
cursor 4
-- preload the sound file...
member("sample").preLoad()
cursor -1
puppetSound 1, (thisSoundFile)
end case
end
--do idle handling...
on exitFrame me
case (me.pBusy) of
-- if we're on...
TRUE:
-- evaluate timer difference...
kCurrentTime = the timer - me.pTimerDifference
-- check if reached sound duration already...
case (kCurrentTime >= me.pSoundLength) of
TRUE: -- stop
me.pBusy = FALSE
end case
end case
--check for cue points...
case ( me.pCurrentCue = me.pCueListCount ) of
FALSE: -- if not reached limit...
case (kCurrentTime > me.pCueList[me.pCurrentCue]) of
TRUE: me.pCurrentCue = me.pCurrentCue + 1
put "Text is: " & line me.pCurrentCue of \
field (member me.pTalkerText)
end case
end case
end
5. Rename a your sample sound file (without cuepoints) to "sample"
--
6. Create frame scripts in score [frame 1]:
on exitFrame me
sendSprite(1,#makeCueTimerObj,
"TALK_WORKFLOW","TALK_WORKFLOW_TEXT","sample")
end
--
7. Create frame scripts in score [frame 3]:
on exitFrame me
go the frame
end
--
8. Drag the "Cue Point Behavior" to a dummy member on sprite 1
--
How it works:
Play the movie and open the message window. The soundfile will be preloaded
and starts to play. If the first "cue point" in field "TALK_WORKFLOW" has
been reached, the behavior "Cue Point Behavior" puts line x of current "cue
point" of field "TALK_WORKFLOW_TEXT" into the message window.
To achieve more useful results, change the text data in field
"TALK_WORKFLOW_TEXT" to handler names, for instance:
handler1()
handler2()
handler3()
Thus, create according handlers and...
... therefore change the exitFrame handler in "Cue Point Behavior"...
...from...
put "Text is: " & line me.pCurrentCue of field (member me.pTalkerText)
...to...
do line me.pCurrentCue of field (member me.pTalkerText)
However, I hope this works (untested), or you get the idea...
Best of luck & a nice weekend to all
Dominik
...
[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!]