Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rateShift

Status
Not open for further replies.

manfishj

Programmer
May 30, 2002
44
US
Hi,
Does anyone know how to use the rateShift function? I am trying to speed up an audio file.

I checked in Director help. When I use the Lingo that it shows, I get an error message. It says "Script error: Comma expected"

Here is the lingo:
sound(channelNum).play(#member: member(whichMember),{#rateShift: shiftAmount})

I tried to use it in a prepareFrame handler. Does anybody know what I may be doing wrong?

manfishj

 
Yours is a little off from the correct way: all the stuff in the parenthesis/bracket double layer as you can see below.

sound(channelNumber).play([#member:member(whichMember), #rateshift: shiftAmount])

As for the handler, prepareFrame makes it hiccup at the very beginning of the sound. Try putting it on any sprite's behavoir in a beginSprite handler.
 
Thanks, archerofloaf. One more question. What I would like to do is click on a fast-forward button which will make the rateShift go up to 12, then I would like to click it again to make it go back to 0. But, when I click it the second time, I would like it to continue from the same spot, as opposed to starting from the beginning. So far, when I tried it, on the second click, it would start the audio from the beginning. Please let me know if you have any suggestions. Thanks again.

manfishj
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top