Parameters
None.
Example
This handler uses
member Norma Desmond Speaks occurred and displays the appropriate error string in a field if
it did:
-- Lingo syntax
on exitFrame
if member("Norma Desmond Speaks").getError() <> 0 then
member("Display Error Name").text = member("Norma Desmond \
Speaks").getErrorString()
end if
end
// JavaScript syntax
function exitFrame() {
var memNor = member("Norma Desmond Speaks").getError();
if (memNor != 0) {
member("Display Error Name").text =
member("Norma Desmond Speaks").getErrorString();
}
}
The following handler checks to see whether an error occurred for a Flash cast member named
Dali, which was streaming into memory. If an error occurred, and it was a memory error, the
script uses the
unloadCast
to a frame in the Director movie named Artists, where the Flash movie sprite first appears, so
Director can again try to load and play the Flash movie. If something other than an out-of-
memory error occurred, the script goes to a frame named Sorry, which explains that the requested
Flash movie can't be played.
-- Lingo syntax
on CheckFlashStatus
errorCheck = member("Dali").getError()
if errorCheck <> 0 then
if errorCheck = #memory then
member("Dali").clearError()
unloadCast()
_movie.go("Artists")
else
_movie.go("Sorry")
end if
end if
end
328
Chapter 12: Methods
to determine whether an error involving the Shockwave Audio cast
getError
command to try to free some memory; it then branches the playhead
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