FORUMS: list search recent posts

Different images, different times during the day

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joakim Werner
Different images, different times during the day
on Mar 18, 2009 at 10:07:13 am

I have a bit of trouble figuring out the following:
I want to have 3 different images displayed at three different time periods during the day (morning, day, evening). I want this to be set at a certain local time as well. Is there a tutorial or guide to help me out? I have CS4 so I could work with as2 or as3. Or is there a better solution other than flash?
Thanks for the help in advance.


Return to posts index

demetri tashie
Re: Different images, different times during the day
on Mar 19, 2009 at 1:34:36 pm

yes this can be done. you will need to explore, and use the DATE CLASS. one of the properties of the DATE CLASS is getHours(). this returns the value in hours of the LOCAL TIME.

this , combined with a conditional statement ( an IF statement) can easily handle that, AS3 handles that just fine.

let us know how you make out


Return to posts index

Joakim Werner
Re: Different images, different times during the day
on Mar 19, 2009 at 1:48:43 pm

Great! Thanks. Now the fun start! Cheers.



Return to posts index


demetri tashie
Re: Different images, different times during the day
on Mar 20, 2009 at 2:31:35 pm

hey Joakim,

since i had never done this before, i wanted to take it out of the realm of theory and try it myself. at least that is my technique for learning new things. i made a small example and posted it here:
http://www.demetri-media.com/date/date.html

it has the local hour loading into a dynamic text field, as well as a separate JPEG image loading into a Loader, 1 new image for each new hour .

all it uses is the DATE CLASS ( new Date(); ) and 1 of its methods: getHours();

let us know how you are doing, and post your results - i would look forward to seeing it.
especially since i put up such lousy graphics for these kind of examples : - )


Return to posts index

Thomas Fortune
Re: Different images, different times during the day
on Apr 23, 2009 at 9:00:43 pm

This is cool!

I'm looking do something similar - I really want to create an "image of the day" script. There would be 7 images in my folder, 1 for each day of the week. (mon, tues, ect.)

Unfortunately I don't have any experience using the date class, so is there any chance that I could get a little guidance on this?

Thanks in advance.


Return to posts index

demetri tashie
Re: Different images, different times during the day
on May 28, 2009 at 2:01:45 pm

hi thomas - sorry that i am just seeing this post/response only as of now. if you are still out there, let me know if you still want help with that, as yes, we can help you accomplish that fairly painlessly !


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]