I want my movie to show the day and time in a text field. And if the time is morning, I want my background picture to be of a morning sky, and afternoon (sunset), a sunset sky, then night, a night sky. So how can I do this?
How do I stream Mp3s from my webpage to the movie, and have a load bar also...I've been trying to do that for the longest.
And, what should I use to make 3D games. (the graphics).
Some sort of 3D software like Maya, or something. Or do I have to use Lingo? Cause if so, I'll never get it done.
Director can obtain the date and time info from the system using
Code:
date
and
Code:
time
(!) Attaching the following behavior to a text sprite will display the date and time:
Code:
--
property spriteNum
on enterFrame me
sprite(spriteNum).member.text = the long date && the long time
end enterFrame
--
Instead of
Code:
the long date
, you can also use
Code:
the date, the abbreviated (abbrev, abbr) date, the short date
. They all have different display format. (Same for
Code:
the time
)
Thus, you can determine the time of the day by using
Code:
the time
. But you have to be careful since the time format varies from country to country, platform to platform, machine to machine…
Something like this should work wherever you are:
Code:
--
hourNow = (the time).char[1..(offset(":", the time) - 1)]
if not((the time) contains "PM") then
if hourNow > 4 and hourNow < 11 then
sprite(backGroundSpriteNum).member = member("morningBackground")
end if
end if
--
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.