-
1. Re: Periodically update time display
elaineccApr 19, 2013 5:18 PM (in response to ladal9)
Hi, ladal9-
You can create a symbol that updates once every minute instead of using code. Just switch your text field to a symbol, and at the 1 minute mark, create a trigger that updates your text field. Hope that helps!
-Elaine
-
2. Re: Periodically update time display
ladal9 Apr 22, 2013 6:59 AM (in response to elainecc)Elaine,
Thanks for the suggestion, unfortunately, I need to do this with code, because my animation does not continuously play, but is controlled by actions.
-
3. Re: Periodically update time display
heathrowe Apr 22, 2013 7:52 AM (in response to ladal9)I am not sure how you have your project set up, but one way is to use the Timeline event handler UPDATE. My example uses the one attached to the default timeline.
See example : http://heathrowe.com/edge/timelineevents/
Download: http://heathrowe.com/edge/timelineevents/timelineevents.zip
Click the green circle to play my stellar animation
Timer element is updated with two variations of time
First is the elapsed time from the moment of play (in milliseconds).
The second is a custom date object (new Date()) that shows an updated clock from the moment the animation plays to end.
hth
Darrell
-
4. Re: Periodically update time display
ladal9 Jun 4, 2013 7:11 AM (in response to heathrowe)Darrell,
Thanks for the response. It worked great, but I'm still having an issue. I'm creating a trainer for a piece of hardware and one of the items displayed on the hardware is current time. I've created several Triggers representing the different states/displays of the hardware, and for each Trigger I have different Actions representing key presses on the device. .
My problem is that when I change to a Trigger, the time on the page is displayed once, but I don't know how to have it continuously update (1/sec). I tried using setInterval, thinking it would set up periodic processing, but that doesn't seem to be working. I think I need to put this processing wherever the processing is that is waiting for an Action to occur, but I don't know how to do that in Edge.
Any suggestions you have would be appreciated.
Thanks