highlighted text and quicktime sound files

Scott Rossi scott at tactilemedia.com
Tue Feb 25 19:27:01 EST 2003


Recently, "Toma Tasovac"  wrote:

> i have a text field and a prerecorded quicktime sound file of the text
> in the text field.  i would like to have the text highlighted sentence
> by sentence as the sound file is being played.  the pedestrian way
> would be to divide the sound file in many smaller files, one for each
> sentence,  but i wonder if there is another way, in which revolution
> could tell the quicktime player which portion of the sound file to play
> as individual sentences get highlighted.
> 
> what would be the most efficient way to both divide (or mark) the
> quicktime sound files and make revolution interact with those portions?

First, note the specific times that correspond to the speaking of each word
in the sound file and store these times (in a property of the field, the
player, your stack, or wherever).  When each word is clicked, set the
currentTime of your player to the corresponding time and start the player.

You may be able to use the startTime and endTime properties to limit the
playback time of the player, depending on how your player is set up.

See the following in the docs:
- timeScale
- currentTime
- playSelection
- startTime
- endTime

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com




More information about the use-livecode mailing list