I dunno if this even is possible - but you guys have suprised me before so, here goes: I would like to make a animation that is adjusted by my (the PC) clock. Say that I have an animation that shows a day -> sunset -> night -> morning -> day… and so on. Looping. Would it be possible to have the sun go down at a certain time etc!
I dont know if my english is understandable or if I just can’t express myself… hope you get it anyhow and that someone’s good enough :hugegrin:
If you want me to post a .fla with some kind of animation, let me know!
Well… you could fit your animation to the length of a day, maybe.
As in, 1 frame represents 1 minute, and then based on the time of the PC, gotoAndStop(minute)?
It’s only 1440 frames
to setup up some variables you could work with. Then if you done some maths, you can make the time manipulate say the brightness of the sun, its position…the colour of the sky, fade from blue to orange to black etc…
but as sun rise/set changes daily and obviously in different parts of the world you may need to consider coding in ActionScript Code:
[FONT=Courier New][LEFT]month = today.[COLOR=#0000FF]getMonth[/COLOR]COLOR=#000000[/COLOR];
day = today.[COLOR=#0000FF]getDate[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]
[/FONT]
so it could work precisely with known figures, but tis wouldn’t be able to account for geographical position, only a preset location…unless you culd read their country too, but thats just getting a bit insane. it depends how precise you want it.
I’m not the best person to ask, but thats where I’d start…
I happened to be looking for cool clocks and found one all in AS.
On line 113 you could do a comparison with a variables that you define up front.
This is probably overkill, but looks cool to me!
I feel bad for always downloading from Kirupa and not contributing. So, that was my first attempt to try and give something back~!
I am extremely new at this so I am glad to know that the attachment was a horrible example because I was actually trying to learn something from it. Apparently I am looking at the wrong type of examples to learn from.
So my question is; Is it the ‘way’ that guy went about creating that clock (just bad scripting), or what?
I am trying very hard to learn AS so I appreciate the fact that you pointed out that this is Bad AS. I am just wondering why it is bad ??
Pre-apologies for trying to ask questions for myself within your thread…so if this is out of line, just ignore!