next up previous
Next: Parentheses Up: Multimedia Programming:Scripting (Lingo) Previous: The Lingo language

Dot Syntax

Use dot syntax to express the properties or functions related to an object or to specify a chunk within a text object. An dot syntax expression begins with the name of the object, followed by a period (dot), and then the property, function, or chunk that you want to specify.

For example, the loc sprite property indicates a sprite's horizontal and vertical position on the Stage. The expression sprite(15).loc refers to the loc property of sprite 15. As another example, the number cast member property specifies a cast member's number.

The expression member("Hot Button").number refers to the cast member number of the Hot Button cast member. Expressing a function related to an object follows the same pattern. For example, the pointInHyperLink text sprite function reports whether a specific point is within a hyperlink in a text sprite.

In addition to the syntax demonstrated in the Lingo Dictionary, you can use the dot syntax textSpriteObject.pointInHyperlink to express this function.

For chunks of text, include terms after the dot to refer to more specific items within text. For example, the expression member("News Items").paragraph(1) refers to the first paragraph of the text cast member News Items.

The expression member("News Items").paragraph(1).line(1) refers to the first line in the first paragraph.


next up previous
Next: Parentheses Up: Multimedia Programming:Scripting (Lingo) Previous: The Lingo language
Dave Marshall
10/4/2001