FORUMS: list search recent posts

Playing with time in Flash

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anoek Houben
Playing with time in Flash
on Jan 11, 2015 at 5:14:23 pm

Hi,

First of all, some background information:
I'm working on a graduation project about syneasthesia (look it up if you like) and making a sort of clock. A friend of mine associates colour with time. Monday is yellow, but morning is darker and evening is lighter for example.
I want to build a application in Flash which demonstrates this. So, a certain time of the day corresponds with a colour. I've worked with Flash as an animation program in the past, but am fairly new to ActionScript.
So far, I've managed to build a clock, and get a background colour which changes over time.

But I'd like the user to be able to scroll through time and thus scroll through the colours.
I'm thinking I should build something that allows the user to navigate through the timeline's frames, in which each frame is associated with a different background colour (a rectangle of the day with a gradient of the corresponding colours which scrolls through the screen throughout the day, one frame per second).
But currently, the time on my clock is corresponding only with the current time, and I'd like the user to be able to return to the current time (and thus colour) at any time, so I'm not really sure how to link the time of the clock to the time of my timeline.

I got help in school as well, but it doesn't hurt to ask here as well I guess :)

I've uploaded a static poster-version of Thursday and it's corresponding colours to my Dropbox, to give a bit of context to the whole story. You can find it here: https://dl.dropboxusercontent.com/u/13487567/thursday%20example.pdf

Thanks in advance,

Anoek


Return to posts index

Sam Mattern
Re: Playing with time in Flash
on Jan 12, 2015 at 1:50:55 pm

The simplest way to do it would to keep what you currently have on frame 1 and start the new stuff frame 2. Frame 1 has your current day/time code and frame 2 starts your gradient animation. Have a button that is only visible after frame 1 and when you push that button it calls gotoAndStop(1). On frame 1 have a button that kicks you over to frame 2. Make sure to put a stop(); on frame 1.

-Sam


Return to posts index

Anoek Houben
Re: Playing with time in Flash
on Jan 12, 2015 at 5:36:19 pm

Thanks for your response!

Good idea to put the current time code on the first frame, but when the user goes back to the current time (and thus back to the first frame), the corresponding colour will be off I guess? Also, when it starts playing again from frame 2, it won't be current time + 1 minute, but just the beginning of my animation, right?


Return to posts index


Sam Mattern
Re: Playing with time in Flash
on Jan 14, 2015 at 2:24:29 pm

Regarding going back to frame one, not necessarily. If you put your actionscript on that frame, I believe it should start anew, again. If it doesn't, there are some tricks you can employ.

Regarding frame 2, I'm not sure how you currently have it coded. If it's not behaving the way you want, you can add code to specify what time it's displaying when you switch to that function.

-Sam


Return to posts index

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