In the Display How Many of the Words That Follow text box, enter the number of words to
8
display after the word number you selected in the previous step. For example if you want to
display 22 words of text after word 16, enter 22 in this text box.
In the remaining text boxes, enter the numbers of the first word of each section of text followed
9
by the number of words in each section. To use more than five sections, drop this behavior on
the sprite again. This procedure can be repeated as often as necessary.
When you have finished entering values in the dialog box, click OK.
10
Accessibility scripting with Lingo or JavaScript syntax
If you have a basic understanding of Lingo or JavaScript syntax, you can write custom scripts to
add text-to-speech functionality to your movies. For more information about Lingo and
JavaScript syntax, see the Scripting Reference topics in the Director Help Panel.
First, you must initialize the speech software.
To initialize the text-to-speech software:
•
Use the
voiceInitialize()
The following frame script tests whether text-to-speech software is installed. If no software is
installed, the script displays an alert dialog box.
on exitFrame
if voiceInitialize() then
_movie.go("Start")
else
alert "Text-to-speech is not available"
end if
end
To determine the number of available voices:
•
Use the
voiceCount()
To return a property list that describes the name, gender, age and index number of the
current voice:
•
Use the
voiceGet()
To return a list of property lists that describes all the available voices:
•
Use the
voiceGetAll()
To set a particular voice as the current voice:
•
Use the
voiceSet()
After you select a voice for speech synthesis, you can control the progress of the speech.
To begin speech synthesis:
•
Use the
voiceSpeak()
To temporarily pause the speech:
•
Use the
voicePause()
Some speech engines might continue to speak for several seconds after the pause method
is used.
434
Chapter 20: Making Director Movies Accessible
method.
method.
method.
method.
method.
method.
method.
Need help?
Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?
Questions and answers