978
Chapter 14: Properties
Example
This statement makes the contents of field cast member 20 the script of cast member 30:
-- Lingo syntax
member(20).text = member(30).scriptText
// JavaScript syntax
member(20).text = member(30).scriptText;
See also
Member
scriptType
Usage
member
whichScript.
scriptType
the scriptType of member
whichScript
Description
Cast member property; indicates the specified script’s type. Possible values are
#movie
,
#score
,
and
#parent
.
Example
This statement makes the script member Main Script a movie script:
member("Main Script").scriptType = #movie
scrollTop
Usage
-- Lingo syntax
memberObjRef
.scrollTop
// JavaScript syntax
memberObjRef
.scrollTop;
Description
Cast member property; determines the distance, in pixels, from the top of a field cast member to
the top of the field that is currently visible in the scrolling box. By changing the value for
scrollTop
member property while the movie plays, you can change the section of the field that
appears in the scrolling field.
This is a way to make custom scrolling behaviors for text and field members.
For example, the following Lingo moves the field cast member Credits up or down within a field’s
box, depending on the value in the variable
sliderVal
:
global sliderVal
on prepareFrame
newVal = sliderVal * 100
member("Credits").scrolltop = newVal
end
Summary of Contents for DIRECTOR MX 2004
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...