MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 1012

Director scripting reference
Table of Contents

Advertisement

Example
This statement issues an alert if an error is detected for the SWA streaming cast member:
-- Lingo syntax
on mouseDown
if member("Ella Fitzgerald").state = 9 then
_player.alert("Sorry, can't find an audio file to stream.")
end if
end
// JavaScript syntax
function mouseDown() {
var ellaSt = member("Ella Fitzgerald").state;
if (ellaSt = 9) {
_player.alert("Sorry, can't find an audio file to stream.");
}
}
Example
The following frame script checks to see if a Flash movie cast member named Intro Movie has
finished streaming into memory. If it hasn't, the script reports in the Message window the current
state of the cast member and keeps the playhead looping in the current frame until the movie
finishes loading into memory.
-- Lingo syntax
on exitFrame
if member("Intro Movie").percentStreamed < 100 then
put("Current download state:" && member("Intro Movie").state)
_movie.go(_movie.frame)
end if
end
// JavaScript syntax
function exitFrame() {
var intSt = member("Intro Movie").percentStreamed;
if (intSt < 100) {
put("Current download state: " + member("Intro Movie").state);
_movie.go(_movie.frame);
}
}
See also
clearError(),
state (RealMedia)
Usage
-- Lingo syntax
memberOrSpriteObjRef.state
// JavaScript syntax
memberOrSpriteObjRef.state;
Description
RealMedia sprite or cast member property; returns the current state of the RealMedia stream,
expressed as an integer in the range 1 to 4. Each state value corresponds to a specific point in the
streaming process. This property is dynamic during playback and can be tested but not set.
1012
Chapter 14: Properties
getError() (Flash, SWA)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents