
264
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
command to try to free some memory; it then branches the playhead
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.
on CheckFlashStatus
errorCheck = member("Dali").getError()
if errorCheck <> 0 then
if errorCheck = #memory then
member("Dali").clearError()
unloadCast
go to frame ("Artists")
else
go to frame ("Sorry")
end if
end if
end
See also
clearError
,
getErrorString()
,
state (Flash, SWA)
getError() (XML)
Syntax
parserObject
.getError()
Description
Function; returns the descriptive error string associated with a given error number (including the
line and column number of the XML where the error occurred). When there is no error, this
function returns
<VOID>
.
Example
These statements check an error after parsing a string containing XML data:
errCode = parserObj.parseString(member("XMLtext").text)
errorString = parserObj.getError()
if voidP(errorString) then
-- Go ahead and use the XML in some way
else
alert "Sorry, there was an error " & errorString
-- Exit from the handler
exit
end if
getErrorString()
Syntax
member(
whichCastMember
). getErrorString()
getErrorString(member
whichCastMember
)
Description
Function; for Shockwave Audio (SWA) cast members, returns the error message string that
corresponds to the error value returned by the
getError()
function.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...