User Guide

426 Chapter 12: Methods
This statement creates a box-shaped model resource called hatbox4.
member("Shelf").newModelResource("hatbox4", #box)
See also
primitives
newMotion()
Usage
member(whichCastmember).newMotion(name)
Description
3D command; creates a new motion within a 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.
Parameters
name
Required. Specifies the name of the new motion. The name of the new motion must be
unique within the referenced cast member.
Example
This Lingo creates a new motion in member 1 called runWithWave that is used to combine the
run and wave motions from the members motion list:
runWithWave = member(1).newMotion("runWithWave")
runWithWave.map("run", "pelvisBone")
runWithWave.map("wave", "shoulderBone")
newObject()
Usage
-- Lingo syntax
spriteObjRef.newObject(objectType {, arg1, arg2 ....})
// JavaScript syntax
spriteObjRef.newObject(objectType {, arg1, arg2 ....});
Description
Flash sprite command; creates an ActionScript object of the specified type.
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 the Shockwave
Player and projectors. You add Xtra extensions to the Xtra list by choosing Modify > Movie > Xtras. For
more information about managing Xtra extensions for distributed movies, see the Using Director
topics in the Director Help Panel.