User Guide

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 scripts 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 fields
box, depending on the value in the variable
sliderVal:
global sliderVal
on prepareFrame
newVal = sliderVal * 100
member("Credits").scrolltop = newVal
end