460
Example
This handler accepts any number of arguments, adds all the numbers passed in as parameters, and
then returns the sum:
on AddNumbers
sum = 0
repeat with currentParamNum = 1 to the paramCount
sum = sum + param(currentParamNum)
end repeat
return sum
end
You would use it by passing in the values you wanted to add:
put AddNumbers(3, 4, 5, 6)
-- 18
put AddNumbers(5, 5)
-- 10
See also
getAt
,
param()
,
paramCount()
,
return (keyword)
paramCount()
Syntax
the paramCount
Description
Function; indicates the number of parameters sent to the current handler.
Example
This statement sets the variable
counter
to the number of parameters that were sent to the
current handler:
set counter = the paramCount
parent
Syntax
member(
whichCastmember
).model(
whichModel
).parent
member(
whichCastmember
).camera(
whichCamera
).parent
member(
whichCastmember
).light(
whichLight
).parent
member(
whichCastmember
).group(
whichGroup
).parent
Description
3D property; when used with a model, camera, light or group reference, this property allows you
to get or set the parent node of the referenced object. The parent node can be any other model,
camera, light or group object.
An object’s
transform
property defines its scale, position and orientation relative to its
parent object.
Setting an object’s parent property to
VOID
is the same as removing the object from the world
using the
removeFromWorld()
command.
Setting an object’s parent property to the World group object (
group("World")
) is the same as
adding an object to the world using the
addToWorld()
command.
Summary of Contents for DIRECTOR MX-LINGO DICTIONARY
Page 1: ...Lingo Dictionary Macromedia Director MX...
Page 756: ...Index 756...