User Guide
386 Chapter 12: Methods
Description
Function; returns a number that identifies which character in a specified field cast member is
closest to a point within the field.
The value 1 corresponds to the first character in the string, the value 2 corresponds to the second
character in the string, and so on.
Parameters
location
Required. A point within the field cast member. The value for location is a point
relative to the upper left corner of the field cast member.
Example
The following statement determines which character is closest to the point 100 pixels to the right
and 100 pixels below the upper left corner of the field cast member Today’s News. The statement
then assigns the result to the variable
PageDesign.
--Lingo syntax
pageDesign = member("Today's News").locToCharPos(point(100, 100))
// JavaScript syntax
var pageDesign = member("Today's News").locToCharPos(point(100, 100));
locVToLinePos()
Usage
-- Lingo syntax
memberObjRef.locVToLinePos(locV)
// JavaScript syntax
memberObjRef.locVToLinePos(locV);
Description
Function; returns the number of the line of characters that appears at a specified vertical position.
Parameters
locV
Required. Specifies the vertical position of the line of characters. This value is the number of
pixels from the top of the field cast member, not the part of the field cast member that currently
appears on the Stage.
Example
This statement determines which line of characters appears 150 pixels from the top of the field
cast member Today’s News and assigns the result to the variable pageBreak:
--Lingo syntax
pageBreak = member("Today's News").locVToLinePos(150)
// JavaScript syntax
var pageBreak = member("Today's News").locVToLinePos(150);