category: website

23
MAR
2009

I have always been interested by flash, yet I never dove into doing it. And of course this this blog design that I have, this design would benefit from a flash header. So this series is going to be two things. Me learning flash, and designing the header. I am going to have bits of code posted on what I figure out while working on the design.

So I have many requirements for my flash header for me to have it. A sample list of these things are below for the header background portion.

  • Action Script 3.0
  • Header “Background” must at real time change colors based on the time of day of the zip code I provide. Total Dark, Dawn, Sunrise, Daytime (Including High Noon), Sunset, and Dusk are the periods in which I must show.
  • The Sun and Moon must “rise” and “set”. With the moon showing the correct phase that it’s currently at based on the zip code I provide.

So far in my adventures today, I read up on gradients and how to automatically create boxes based of hex values I provided the system. This was a great way to start, but I wanted it to change based on the time of day. So I figured I could use the same formula and make it so the blending of the two colors in the scale change proportionately vs. having an background that would have to move over the course of 4 million flash frames – change based on the time of day. I didn’t want to go through creating 4 million frames in flash and then having problems with file size. So there has got to be another way! Eureka! There was!

read more ‘Flash Header, Intro and Background Code