hyperlinkState
803
hyperlinkState
Usage
-- Lingo syntax
chuckExpression
.hyperlinkState
// JavaScript syntax
chuckExpression
.hyperlinkState;
Description
Text cast member property; contains the current state of the hyperlink. Possible values for the
state are:
#normal
,
#active
, and
#visited
.
This property can be tested and set.
Like
hyperLink
and
hyperLinkRange
, the returned range of the link contains the first character
of
chunkExpression
.
Example
The following handler checks to see if the hyperlink clicked is a web address. If it is, the state of
the hyperlink text state is set to #visited, and the movie branches to the web address.
--Lingo syntax
property spriteNum
on hyperlinkClicked me, data, range
if data starts "http://" then
currentMember = sprite(spriteNum).member
currentMember.word[4].hyperlinkState = #visited
gotoNetPage(data)
end if
end
// JavaScript syntax
function hyperlinkClicked(data, range) {
var st = data.slice(0,7);
var ht = "http://";
if (st = ht) {
currentMember = sprite(spriteNum).member;
currentMember.getPropRef("word", 4).hyperlinkState = symbol("visited");
gotoNetPage(data);
}
}
See also
hyperlink
,
hyperlinkRange
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...