![MACROMEDIA DIRECTOR MX 2004 Reference Download Page 588](http://html1.mh-extra.com/html/macromedia/director-mx-2004/director-mx-2004_reference_687516588.webp)
588
Chapter 12: Methods
Example
These statements stop the speech when the playhead moves to the next frame in the Score:
-- Lingo syntax
on exitFrame
voiceStop()
end exitFrame
// JavaScript syntax
function exitFrame() {
voiceStop();
}
See also
voiceSpeak()
,
voicePause()
,
voiceResume()
,
voiceGetRate()
,
voiceSetRate()
,
voiceGetPitch()
,
voiceSetPitch()
,
voiceGetVolume()
,
voiceSetVolume()
,
voiceState()
,
voiceWordPos()
,
voiceSpeak()
voiceWordPos()
Usage
-- Lingo syntax
voiceWordPos()
// JavaScript syntax
voiceWordPos(); // documentation n/a
Description
Function; returns an integer indicating the position of the word that is currently being spoken
within the entire string that contains it. For example, if a cast member containing 15 words is
being spoken and the fifth word of the cast member is being spoken when the function is used,
the return value is 5.
Parameters
None.
Example
The following statements cause the sentence “Hello, how are you?” to be spoken and display the
current word position in the Message window. Since the
voiceWordPos()
function is called
immediately after the
voiceSpeak()
command is used, the return value will be 1.
-- Lingo syntax
voiceSpeak(“Hello, how are you?”)
put voiceWordPos()
-- 1
// JavaScript syntax
voiceSpeak("Hello, how are you?");
put(voiceWordPos());
// 1
See also
voiceSpeak()
,
voicePause()
,
voiceResume()
,
voiceStop()
,
voiceGetRate()
,
voiceSetRate()
,
voiceGetPitch()
,
voiceSetPitch()
,
voiceGetVolume()
,
voiceSetVolume()
,
voiceState()
,
voiceSpeak()
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...