Highlighted

Advanced Actions and Reusing Variables

Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

I am working on a project that is using the same basic set of advance actions where forward motion is dependent on a variable.

Basically - the user will click on button, the advance actions sets a value of 1 for a variable and executes the action. There is a conditional checking, if all variables are equal to 1 then another interaction will appear to move the user forward. I also have an "on exit" advance action set up on this slide that resets the value of all the variables I used to 0.

The first slide I have this on, all the actions work as they are intended to. However - on the second slide that I am using this set up on, once the user clicks one or two buttons, the forward action shows up even though technically not all the variables have been assigned a value of 1.

Does anyone have any ideas on a possible solution or what may be going wrong? I would really not want to have to create new variables for each time I want to use this slide in my project.

Project AAs.png

It's always better to avoid OnExit actions. They do not always work the way we would expect, since they are only fired if the slide reaches its last frame (Lilybiri has much to say about timelines, frames, actions ...).

Much better to do the variable resets OnEnter.

Since this will be repeated on lots of slides, these look like good candidates for a shared actions!

Views

113

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

Advanced Actions and Reusing Variables

Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

I am working on a project that is using the same basic set of advance actions where forward motion is dependent on a variable.

Basically - the user will click on button, the advance actions sets a value of 1 for a variable and executes the action. There is a conditional checking, if all variables are equal to 1 then another interaction will appear to move the user forward. I also have an "on exit" advance action set up on this slide that resets the value of all the variables I used to 0.

The first slide I have this on, all the actions work as they are intended to. However - on the second slide that I am using this set up on, once the user clicks one or two buttons, the forward action shows up even though technically not all the variables have been assigned a value of 1.

Does anyone have any ideas on a possible solution or what may be going wrong? I would really not want to have to create new variables for each time I want to use this slide in my project.

Project AAs.png

It's always better to avoid OnExit actions. They do not always work the way we would expect, since they are only fired if the slide reaches its last frame (Lilybiri has much to say about timelines, frames, actions ...).

Much better to do the variable resets OnEnter.

Since this will be repeated on lots of slides, these look like good candidates for a shared actions!

Views

114

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
Mar 18, 2019 0
Engaged ,
Mar 18, 2019

Copy link to clipboard

Copied

It's always better to avoid OnExit actions. They do not always work the way we would expect, since they are only fired if the slide reaches its last frame (Lilybiri has much to say about timelines, frames, actions ...).

Much better to do the variable resets OnEnter.

Since this will be repeated on lots of slides, these look like good candidates for a shared actions!

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
Reply
Loading...
Mar 18, 2019 1
Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

Thanks Dan! This worked!

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
Reply
Loading...
Mar 18, 2019 0
Most Valuable Participant ,
Mar 18, 2019

Copy link to clipboard

Copied

Is it possible to use the Preview window when posting a screenshot of an advanced action, please? It is the first button in the top right control bar of the dialog box. Full exploration of the Advanced Actions dialog box in CP2017/CP2019 o be found in:

Advanced Actions Dialog box in Captivate 2017/2019 - Captivate blog

The ELSE part of the second decision is not visible.

Indeed, as Dan56 pointed out, it is a bad idea to use the On Exisldie event to trigger any action. There are several reasons, which I explained in:

Available Events in Adobe Captivate - Captivate blog

Reset the variables On Enter for each slide, with the same action you use now.

I would like to see the timeline of that slide.

To debug, add a text container in which you display all the user variables for the condition.

The way you set up the action will make it pretty impossible to use a shared action in this case, sorry.  I could find a workaround however. Reusing the variables is something I am doing daily. Have to know if the buttons can be clicked more than once? If you can disable them it would be easier to set up a shared action.

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
Reply
Loading...
Mar 18, 2019 1
MsAMES LATEST
Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

Thanks Lilybiri! Placing the advance action into an on enter execution makes it work the way I wanted it to.

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
Reply
Loading...
Mar 18, 2019 0