Example
In this behavior, all of the sprites have already been set to draggable. Sprite 2b contains a small
bitmap. Sprite 1s is a rectangular shape sprite large enough to easily contain sprite 2b. Sprite 4b is
a larger version of the bitmap in sprite 2b. Sprite 3s is a larger version of the shape in sprite 1s.
Moving sprite 2b or sprite 1s will cause sprite 4b to move. When you drag sprite 2b, its
movements are mirrored by sprite 4b. When you drag sprite 1s, sprite 4b moves in the opposite
direction. Resizing sprite 2b or sprite 1s will also produce interesting results.
on exitFrame
sprite(4b).rect = map(sprite(2b).rect, sprite(1s).rect, sprite(3s).rect)
go the frame
end
map (3D)
Usage
member(whichCastmember).motion(whichMotion).\
map(whichOtherMotion {, boneName})
Description
3D motion command; maps a specified motion into the current motion, and applies it to a bone
and all of the children of that bone. This command replaces any motion previously mapped to
the specified bone and its children. This command does not change a model's playlist.
Parameters
whichOtherMotion
Optional. A string that specifies the name of the bone to which the mapped motion is
boneName
applied. If omitted, the root bone is used.
Example
The following statement maps the motion named LookUp into the motion named SitDown
starting from the bone named Neck. The model will sit down and look up at the same time.
member("Restaurant").motion("SitDown").map("LookUp", "Neck")
See also
motion(),
duration
mapMemberToStage()
Usage
sprite(whichSpriteNumber). mapMemberToStage(whichPointInMember)
mapMemberToStage(sprite whichSpriteNumber, whichPointInMember)
Description
Function; uses the specified sprite and point to return an equivalent point inside the dimensions
of the Stage. This properly accounts for the current transformations to the sprite using
the rectangle if not transformed.
This is useful for determining if a particular area of a cast member has been clicked, even if there
have been major transformations to the sprite on the Stage.
390
Chapter 12: Methods
Required. A string that specifies the name of the motion to map.
(3D),
cloneMotionFromCastmember
, or
quad
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