HMStoFrames()
357
Example
This frame script checks to see if the mouse is currently located over a button in a Flash movie
sprite in channel 5 and, if it is, the script sets a text field used to display a status message:
-- Lingo syntax
on exitFrame
if sprite(5).hitTest(_mouse.mouseLoc) = #button then
member("Message Line").text = "Click here to play the movie."
_movie.updatestage()
else
member("Message Line").text = ""
end if
_movie.go(_movie.frame)
end
// JavaScript syntax
function exitFrame() {
var hT = sprite(5).hitTest(_mouse.mouseLoc);
if (hT = "button") {
member("Message Line").text = "Click here to play the movie.";
_movie.updatestage();
} else {
member("Message Line").text = "";
}
_movie.go(_movie.frame)
}
HMStoFrames()
Usage
HMStoFrames(
hms
,
tempo
,
dropFrame
,
fractionalSeconds
)
Description
Function; converts movies measured in hours, minutes, and seconds to the equivalent number of
frames or converts a number of hours, minutes, and seconds into time if you set the
tempo
argument to 1 (1 frame = 1 second).
Parameters
hms
Required. A string expression that specifies the time in the form
sHH:MM:SS.FFD
, where:
tempo
Required. Specifies the tempo in frames per second.
s
A character is used if the time is less than zero, or a space if the time is greater than or equal
to zero.
HH
Hours.
MM
Minutes.
SS
Seconds.
FF
Indicates a fraction of a second if
fractionalSeconds
is
TRUE
or frames if
fractionalSeconds
is
FALSE
.
D
A d is used if
dropFrame
is
TRUE
, or a space if
dropFrame
is
FALSE
.
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...