end if
return parsedList
end
// JavaScript syntax
function ConvertToList(xmlString) {
parserObject = new Xtra("xmlparser"); // check syntax
errorCode = parserObject.parseString(xmlString);
errorString = parserObject.getError();
if (voidP(errorString)) {
parsedList = parserObject.makeList();
} else {
alert("Sorry, there was an error" + errorString);
return false;
}
return parsedList;
}
See also
makeSubList()
makeScriptedSprite()
Usage
-- Lingo syntax
spriteChannelObjRef.makeScriptedSprite({memberObjRef, loc})
// JavaScript syntax
spriteChannelObjRef.makeScriptedSprite({memberObjRef, loc});
Description
Sprite Channel method; switches control of a sprite channel from the Score to script, and
optionally places a sprite from a specified cast member at a specified location on the Stage.
Call
removeScriptedSprite()
Parameters
Optional. A reference to the cast member from which a scripted sprite is created.
memberObjRef
Providing only this parameter places the sprite in the center of the Stage.
Optional. A point that specifies the location on the Stage at which the scripted sprite
loc
is placed.
Example
The following statement creates a scripted sprite in sprite channel 5 from the cast member named
kite, and places it at a specific point on the Stage:
-- Lingo syntax
channel(5).makeScriptedSprite(member("kite"), point(35, 70))
// JavaScript syntax
channel(5).makeScriptedSprite(member("kite"), point(35, 70));
See also
removeScriptedSprite(),
388
Chapter 12: Methods
to switch control of the sprite channel back to the Score.
Sprite Channel
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