Checking Which Text Is Under The Pointer With Lingo Or Javascript Syntax; Responding To Rollovers With Lingo Or Javascript Syntax - Adobe 65036570 - Director - PC User Manual

User guide
Hide thumbs Also See for 65036570 - Director - PC:
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.
Use script that applies to text and field cast members in the following ways:
To detect which character in a text or field cast member is under the pointer, use the
To detect which item in a text or field cast member is under the pointer, use the
To detect which word in a text or field cast member is under the pointer, use the
To detect which paragraph in a text or field cast member is under the pointer, use the
method.
Use script that applies only to text cast members: To detect whether a specific point is in a hypertext link within a
text cast member and is under the pointer, use the
Use script that applies only to the following field cast members:
To detect which line in a field is under the pointer, use the
To detect which word in a field is under the pointer, use the
For more information, 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
event handler.
mouseEnter
To set up script that runs when the mouse pointer leaves a sprite's bounding rectangle, place the script in an
event handler.
mouseLeave
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
To set up script that runs when the mouse pointer is within a sprite's bounding rectangle when the playhead
enters the frame that contains the sprite, place the script in an
The
event can occur repeatedly as long as the mouse pointer remains inside the sprite.
mouseWithin
To determine whether the cursor is over a specific sprite, use the
pointInHyperlink()
event handler.
on mouseUpOutside
pointToItem()
pointToWord()
method.
property.
mouseLine
property.
mouseWord
event handler.
on mouseWithin
method.
rollOver()
ADOBE DIRECTOR 11.0
User Guide
method.
pointToChar()
method.
method.
pointToParagraph()
on
on
294

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents