Skip to main content
Participating Frequently
February 3, 2008
Answered

Realtime Animation - I Need Solutions!

  • February 3, 2008
  • 3 replies
  • 438 views
Hello Everybody.
I have an idea by using flash actionscripting but dont not it's possible or not.
I will soon make a 3d web site for a company.It will be a city and now created 2 city form.
1- City Morning
2- City Night
For example user uses computer at night "City_Morning" animation will be loaded.or opposite.
( When computer time shows between 18:00 - 05:00i animation will show night and when it is not it will show morning animation)
Just i want to ask if it is possible to do such an animation timer in flash.I am not an expert programmer.If you can help me i will be very happy.

Thanks
This topic has been closed for replies.
Correct answer kglad
:

3 replies

kglad
Community Expert
Community Expert
February 5, 2008
you're welcome.
kglad
Community Expert
Community Expert
February 3, 2008
the flash help files often have helpful examples of code usage. this is true for the date class.

to check for more detailed tutorials, it's helpful to use google to search for:

flash tutorial [topic]

where [topic] would be "date class" in this situation.
Participating Frequently
February 5, 2008
Hi kglad
i create such a code.At least it works.But not exactly like i need.

time = new Date();
var hours = time.getHours();
if (hours<=18) {
this.gotoAndPlay("3");
}
if (hours>=19) {
this.gotoAndPlay("4");
}

but i want it between 05:00 and 18:00 gotoAndPlay (3);
and also between 19:00 and 04:00 gotoAndPlay(4);
which code i have to add?

thanks
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 5, 2008
:

kglad
Community Expert
Community Expert
February 3, 2008
you can use the date class to have flash access the local computer time.
Participating Frequently
February 3, 2008
thanks kglad for your help.Is there any tutorial that you can suggest?