I have two slides. First slide has buttons. I want the second slide to have timers, that commence counting down when the buttons on the first slide are clicked.
I'm fairly good with variables. How can I say "start at 100 seconds and count down once the button is clicked"?
Matthew - thanks for this response, I was hoping there'd be a coded solution. I'm creating the "3 Switches 3 Bulbs" problem to teach "thinking outside of the box".
It's important that they can turn off the light switch in room 1, and walk into room 2 and see that the bulb is still cooling down (even though it's been switched off).
I'm trying to think of different ways to implement this, and one is to have the bulbs temperature displayed (perhaps when they hover the cursor over the bulb). Another could be to have the bulb or filament glow dull for 10 seconds (that's easier to implement). Either way I need to use a timer of sorts.
With my project - the "multiple clicks speed up the timer" will be a problem, I might try to re-code it or find a workaround.
Any more clues?
PS - any way to "stop" the Java execution with a different trigger? That would be an easy solution - because the user have to turn the switch OFF before they can turn it back ON again (and re-activate the script).
The downside of this code is that if the button is pressed multiple times it speeds up the timer. Hopefully someone has a better approach that works around this issue.
To work around this, you should create an additional "t/f" variable (say "counterActive") and use it as a condition to execute the JS only once.
I'm trying to think of different ways to implement this, and one is to have the bulbs temperature displayed (perhaps when they hover the cursor over the bulb). Another could be to have the bulb or filament glow dull for 10 seconds (that's easier to implement). Either way I need to use a timer of sorts.
Ok, the JS included in this post might help you to leverage the temperatures as you wish. You'll probably need to adjust the timings of the variable increase/decrease to be slower, but the functionality you seek is already there (not sure if the demo link still works, but the source is included).
See the attached story file to understand how it is set up...
Yes - that's a simple/elegant solution (making use of the entrance animation). I can't see a way for it to work on multiple slides though (with the bulbs on the second slide). See my story project file above ^.
Got it! I was able to manipulate your example to make it work. Essentially the trick is using entrance animation to time the cool-down (rather than trying to implement an actual timer).
Naturally - variables allowed me to work across slides.
It's not perfect (when you open the second slide with bulbs, any that were "recently switched off" will cool down together in sync - instead of cooling down X number of seconds after they were turned off). Would be great to figure out how to achieve that. I guess I could add multiple sectional variables for each bulb (splitting the animation-timer into four parts).
11 Replies
Matthew - thanks for this response, I was hoping there'd be a coded solution. I'm creating the "3 Switches 3 Bulbs" problem to teach "thinking outside of the box".
It's important that they can turn off the light switch in room 1, and walk into room 2 and see that the bulb is still cooling down (even though it's been switched off).
I'm trying to think of different ways to implement this, and one is to have the bulbs temperature displayed (perhaps when they hover the cursor over the bulb). Another could be to have the bulb or filament glow dull for 10 seconds (that's easier to implement). Either way I need to use a timer of sorts.
With my project - the "multiple clicks speed up the timer" will be a problem, I might try to re-code it or find a workaround.
Any more clues?
PS - any way to "stop" the Java execution with a different trigger? That would be an easy solution - because the user have to turn the switch OFF before they can turn it back ON again (and re-activate the script).
To work around this, you should create an additional "t/f" variable (say "counterActive") and use it as a condition to execute the JS only once.
Ok, the JS included in this post might help you to leverage the temperatures as you wish. You'll probably need to adjust the timings of the variable increase/decrease to be slower, but the functionality you seek is already there (not sure if the demo link still works, but the source is included).
Hope this helps,
Alex
Looks like you are getting some great assistance here Simon :)
Yes - that's a simple/elegant solution (making use of the entrance animation). I can't see a way for it to work on multiple slides though (with the bulbs on the second slide). See my story project file above ^.
Matthew!
Got it! I was able to manipulate your example to make it work. Essentially the trick is using entrance animation to time the cool-down (rather than trying to implement an actual timer).
Naturally - variables allowed me to work across slides.
It's not perfect (when you open the second slide with bulbs, any that were "recently switched off" will cool down together in sync - instead of cooling down X number of seconds after they were turned off). Would be great to figure out how to achieve that. I guess I could add multiple sectional variables for each bulb (splitting the animation-timer into four parts).
Will post final product when complete.
So,
Somewhat a finished product now, for those who are interest:
http://goo.gl/G1fm4x
This post was removed by the author
Thanks for continuing to share Simon!
Thanks for your help Matthew! Will update again over the coming days.
Hi Guys/Gals,
Here is the "almost final" cut. Hopefully with the extra fluff it's more intuitive now.
Feedback would be great.
http://goo.gl/G1fm4x
Nice Simon! Thanks for sharing :)
This discussion is closed. You can start a new discussion or contact Articulate Support.