User Guide
getWorldTransform() 347
This statement sets the variable tObject to refer to the same object that the variable named gVar
refers to in the Flash movie in sprite 3:
-- Lingo syntax
tObject = sprite(3).getVariable("gVar",FALSE)
// JavaScript syntax
var tObject = sprite(3).getVariable("gVar",0);
This statement returns the value of the variable currentURL from the Flash cast member in sprite
3 and displays it in the Message window:
-- Lingo syntax
put(sprite(3).getVariable("currentURL"))
// JavaScript syntax
trace(sprite(3).getVariable("currentURL"));
See also
setVariable()
getWorldTransform()
Usage
member(whichCastmember).node(whichNode).getWorldTransform()
member(whichCastmember).node(whichNode).getWorldTransform().\
position
member(whichCastmember).node(whichNode).getWorldTransform().\
rotation
member(whichCastmember).node(whichNode).getWorldTransform().scale
Description
3D command; returns the world-relative transform of the model, group, camera, or light
represented by
node.
The
transform property of a node is calculated relative to the transform of the node’s parent, and
is therefore parent-relative. The
getWorldTransform() command calculates the node’s transform
relative to the origin of the 3D world, and is therefore world-relative.
Use
member(whichCastmember).node(whichNode).getWorldTransform().position to find
the position property of the node’s world-relative transform. You can also use
worldPosition as a
shortcut for
getWorldTransform().position.
Use
member(whichCastmember).node(whichNode).getWorldTransform().rotation to find
the rotation property of the node’s world-relative transform.
Use
member(whichCastmember).node(whichNode).getWorldTransform().scale to find the
scale property of the node’s world-relative transform.
These properties can be tested but not set.