Skip to main content
Participant
April 17, 2011
Question

How To insert Day And Time In flash AS2?

  • April 17, 2011
  • 1 reply
  • 1254 views

I want to display Day and time in flash with AS2
not only that i want to put certain event on certain date and time
that means
i have a movie clip with object on it ,when i run it,
it changes its position

BUT now i want to change movie clip position on certain date and time

for eg;
I have made a simple move clip of firework i want it auto play when it is
(01.01.2012) (12:00 AM)

Help Me.....

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 17, 2011

if you don't mind the limitations of the user's date/time from their computer, you can use the flash date class.  otherwise, you'll need server-side code.

RunzunAuthor
Participant
April 17, 2011

i don't mind either user or server time i just need a code which works in that certain time

kglad
Community Expert
Community Expert
April 17, 2011

user time is easiest.  the following checks if it's between 12am and 1am jan 1, 2012.

var d:Date=new Date();

if(d.getMonth()==0&d.getDate()==1&&d.getFullYear()==2012&&d.getHours()<1){

// fireworks

}