User Guide

scrollByLine() 519
Example
In Lingo only, these statements check whether a child object is an instance of the parent script
Warrior Ant:
-- Lingo syntax
if (bugObject.script = script("Warrior Ant")) then
bugObject.attack()
end if
This statement sets the variable actionMember to the script cast member Actions:
-- Lingo syntax
actionMember = script("Actions")
// JavaScript syntax
var actionMember = script("Actions");
scrollByLine()
Usage
-- Lingo syntax
memberObjRef.scrollByLine(amount)
// JavaScript syntax
memberObjRef.scrollByLine(amount);
Description
Command; scrolls the specified field or text cast member up or down by a specified number of
lines. Lines are defined as lines separated by carriage returns or by wrapping.
Parameters
amount
Required. Specifies the number of lines to scroll. When amount is positive, the field
scrolls down. When
amount is negative, the field scrolls up.
Example
This statement scrolls the field cast member Todays News down five lines:
--Lingo syntax
member("Today's News").scrollbyline(5)
// JavaScript syntax
member("Today's News").scrollbyline(5);
This statement scrolls the field cast member Todays News up five lines:
--Lingo syntax
member("Today’s News").scrollByLine(-5)
// JavaScript syntax
member("Today’s News").scrollByLine(-5);