• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

How to interrupt Delay once it starts in Advanced Actions

New Here ,
May 25, 2022 May 25, 2022

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!

 

 

TOPICS
Advanced , Advanced actions

Views

48

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2022 May 25, 2022

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?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2022 May 26, 2022

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?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 25, 2022 May 25, 2022

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);

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

LATEST

Thanks for the javascript idea. I'll play with that.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines