light()
381
length()
Usage
string.length
length(
string
)
Description
Function; returns the number of characters in the string specified by
string
, including spaces
and control characters such as TAB and RETURN.
Parameters
None.
Example
This statement displays the number of characters in the string “Macro”&“media”:
put ("Macro" & "media").length
-- 10
This statement checks whether the content of the field cast member Filename has more than 31
characters and if it does, displays an alert:
-- Lingo syntax
if member("Filename").text.length > 31 then
alert "That filename is too long."
end if
// JavaScript syntax
if (member("Filename").text.length > 31) {
alert("That filename is too long.");
}
See also
chars()
,
offset() (string function)
light()
Usage
member(
whichCastmember
).light(
whichLight
)
member(
whichCastmember
).light[
index
]
member(
whichCastmember
).light(
whichLight
).
whichLightProperty
member(
whichCastmember
).light[
index
].
whichLightProperty
Description
3D element; an object at a vector position from which light emanates.
For a complete list of light properties and commands, see the Using Director topics in the
Director Help Panel.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...