MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 442

Director scripting reference
Table of Contents

Advertisement

This JavaScript syntax parses the document sample.xml at MyCompany.com and calls the
parseDone function in the object testObject, which is an instance of the defined TestScript class:
parserObject = new xtra("XMLParser");
testObject = new TestScript(parserObject);
errorCode = parserObject .parseURL("http://www.MyCompany.com/sam- ple.xml",
symbol("parseDone"), testObject)
Here is the TestScript class definition:
TestScript = function (aParser) {
this.myParserObject = aParser;
}
TestScript.prototype.parseDone = function () {
if (this.myParserObject.getError() == undefined) {
trace("successful parse");
} else {
trace("Parse error:");
trace(" " + this.myParserObject.getError());
}
}
See also
getError()
(XML),
pass
Usage
pass
Description
Command; passes an event message to the next location in the message hierarchy and enables
execution of more than one handler for a given event.
The
command branches to the next location as soon as the command runs. Any Lingo that
pass
follows the
pass
By default, an event message stops at the first location containing a handler for the event, usually
at the sprite level.
If you include the
hierarchy even though the handler would otherwise intercept the event.
Parameters
None.
Example
This handler checks the key presses being entered, and allows them to pass through to the editable
text sprite if they are valid characters:
-- Lingo syntax
on keyDown me
legalCharacters = "1234567890"
if legalCharacters contains the key then
pass
else
beep
end if
442
Chapter 12: Methods
parseString()
command in the handler does not run.
command in a handler, the event is passed to other objects in the
pass

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