Copy link to clipboard
Copied
This Advanced Action:
Assign v_hint with 0
If v_hint = 0
then
Delay 5 seconds
Show img_01
This AA is applied when entering a slide and works as intended. However, if the v_hint value changes to 1 before 5 seconds has elapsed, img_01 still appears anyway. This makes sense since once the AA is triggered, the Delay action will begin immediately and can't be stopped, as far as I can tell, even if that v_hint value changes.
I solved my problem in an enirely different way but would still be interested in any ideas out there about ways to control the Delay action.
Thanks!
Thanks!
Copy link to clipboard
Copied
Indeed the Delay command will not bother about pausing points neither. For that reason it needs to be used with much care. I found that a combination with a non-infinite While loop works well. For your use case, I would need more information about the precise goal. How can the variable be changed before the delay time elapses?
Copy link to clipboard
Copied
Oh, I forgot about the while loop, even though I used it for this sort of thing before. The v_hint variable is incremented by 1 when one of two click boxes is clicked. One on those click boxes fills the whole frame.
I think using the while loop might help with this, right?
Copy link to clipboard
Copied
How about this JavaScript approach? I suppose this could be crafted with advanced actions as well - I just function in the JavaScript world.
You could place something like this on a button to execute the 5 second countdown.
At the end of 5 seconds, the variable is checked. If 0 - show it. Otherwise - nothing.
That way - whatever other mechanism you have for changing the value of your variable won't matter.
This could easily grow to accommodate more requirements.
setTimeout(function() {
if (v_hint == 0) {
cp.show("myImage");
}
}, 5000);
Copy link to clipboard
Copied
Thanks for the javascript idea. I'll play with that.