User Guide
350
Description
Function; returns a number that identifies which character in the specified field cast member is
closest to the point within the field specified by
location. The value for location is a point
relative to the upper left corner of the field cast member.
The value 1 corresponds to the first character in the string, the value 2 corresponds to the second
character in the string, and so on.
Examples
The following statement determines which character is closest to the point 100 pixels to the right
and 100 pixels below the upper left corner of the field cast member Today’s News. The statement
then assigns the result to the variable
PageDesign.
pageDesign = member("Today’s News").locToCharPos(point(100, 100))
This handler tells which character is under the pointer when the user clicks the mouse over the
field sprite Information:
on mouseDown
put member("Information").locToCharPos(the clickLoc - \
(sprite(the clickOn).loc))
end
lockTranslation
Syntax
member(whichCastmember).model(whichModel).bonesPlayer.\
lockTranslation
member(whichCastmember).model(whichModel).keyframePlayer.\
lockTranslation
Description
3D #bonesPlayer and #keyframePlayer modifier property; prevents displacement from the
specified plane(s) except by the absolute translation of the motion data. Any additional
translation introduced either manually or through cumulative error is removed. The possible
values of
#none, #x, #y, #z, #xy, #yz, #xz, and #all control which of the three translational
components are controlled for each frame. When a lock on an axis is turned on, the current
displacement along that axis is stored and used thereafter as the fixed displacement to which the
animation is relative. This displacement can be reset by deactivating that axis lock, moving the
object, and reactivating that axis lock.
In other words, it defines the axis of translation to ignore when playing back a motion. To keep a
model locked to a ground plane with the top pointing along the z-axis, set
lockTranslation to
#z. The default value for this property is #none.
Example
This statement sets the lockTranslation property of the model named Walker to #z.
member("ParkScene").model("Walker").bonesPlayer.\
lockTranslation = #z
See also
immovable