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
argument to 1 (1 frame = 1 second).
Parameters
Required. A string expression that specifies the time in the form
hms
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
D
A d is used if
Required. Specifies the tempo in frames per second.
tempo
fractionalSeconds
is
.
FALSE
is
, or a space if
dropFrame
TRUE
sHH:MM:SS.FFD
is
or frames if
TRUE
is
.
dropFrame
FALSE
tempo
, where:
HMStoFrames()
357
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers