Checking Which Text Is Under The Pointer With Lingo Or Javascript Syntax; Responding To Rollovers With Lingo Or Javascript Syntax - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Checking which text is under the pointer with Lingo or
JavaScript syntax
Lingo or JavaScript syntax can detect which text component in a text or field cast member is
currently under the mouse pointer. For more information, see the Scripting Reference topics in
the Director Help Panel.
Use script that applies to text and field cast members as follows:
To detect which character in a text or field cast member is under the pointer, use the
pointToChar()
To detect which item in a text or field cast member is under the pointer, use the
pointToItem()
To detect which word in a text or field cast member is under the pointer, use the
pointToWord()
To detect which paragraph in a text or field cast member is under the pointer, use the
pointToParagraph()
Use script that applies only to text cast members as follows: To detect whether a specific point is
in a hypertext link within a text cast member and is under the pointer, use the
pointInHyperlink()
Reference topics in the Director Help Panel.
Use script that applies only to field cast members as follows:
To detect which line in a field is under the pointer, use the
information about this property, see the Scripting Reference topics in the Director Help Panel.
To detect which word in a field is under the pointer, use the
information about this property, see the Scripting Reference topics in the Director Help Panel.

Responding to rollovers with Lingo or JavaScript syntax

You often want some action to occur when the user rolls the mouse pointer over a sprite or
a particular place on the Stage. You can use Lingo or JavaScript syntax to specify how the movie
responds to such rollovers.
Director provides several event handlers that run when the pointer rolls over a sprite. Messages for
each of these events are sent to the sprite script, the script of the cast member, the frame script,
and then the movie script. For more information, see the Scripting Reference topics in the
Director Help Panel.
To set up script that runs when the mouse pointer enters a sprite's bounding rectangle, place
the script in an
To set up script that runs when the mouse pointer leaves a sprite's bounding rectangle, place
the script in an
To set up script that runs when the user clicks a sprite, rolls the pointer off the sprite, and then
releases the mouse button, place the script in an
296
Chapter 13: Navigation and User Interaction
method.
method.
method.
method.
method. For more information about this method, see the Scripting
event handler.
on mouseEnter
event handler.
on mouseLeave
mouseLine
mouseWord
on mouseUpOutside
property. For more
property. For more
event handler.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents