User Guide
430
newMotion()
Syntax
member(whichCastmember).newMotion(name)
Description
3D command; creates a new motion within the referenced cast member, and returns a reference
to the new motion. A new motion can be used to combine several previously existing motions
from the member’s motion list via the
map() command. All motions within a referenced cast
member must have a unique name.
Example
This Lingo creates a new motion in member 1 called runWithWave that is used to combine the
run and wave motions from the member’s motion list:
runWithWave = member(1).newMotion("runWithWave")
runWithWave.map("run", "pelvisBone")
runWithWave.map("wave", "shoulderBone")
newObject()
Syntax
flashSpriteReference.newObject("objectType" {, arg1, arg2 ....})
newObject("objectType" {, arg1, arg2 ....})
Description
Flash sprite command; creates an ActionScript object of the specified type. Any initialization
parameters required by the object can be specified after the object type. Each argument must be
separated by a comma. The command returns a reference to the new object.
The following syntax creates an object within a Flash sprite:
flashSpriteReference.newObject("objectType" {, arg1, arg2 ....})
The following syntax creates a global object:
newObject("objectType" {, arg1, arg2 ....})
Note: If you have not imported any Flash cast members, you must manually add the Flash Asset Xtra to your movie’s
Xtra list in order for global Flash commands to work correctly in Shockwave and projectors. You add Xtra
extensions to the Xtra list by choosing Modify > Movie > Xtras.For more information, see “Managing Xtra extensions
for distributed movies” in Director Help (Help > Using Director > Packaging Movies for Distribution).
Examples
This Lingo sets the variable tLocalConObject to a reference to a new LocalConnection object
in the Flash movie in sprite 3:
tLocalConObject = sprite(3).newObject("LocalConnection")
The following Lingo sets the variable tArrayObject to a reference to a new array object in the
Flash movie in sprite 3. The array contains the 3 integer values 23, 34, and 19.
tArrayObject = sprite(3).newObject("Array",23,34,19)
See also
setCallback(), clearAsObjects()