December 15, 2020
Trouble understanding blocks in advanced actions
Comments
(10)
December 15, 2020
Trouble understanding blocks in advanced actions
Dr. Ferran has fully developed over 20 high-quality online courses. He has also taught and given academic lectures in English and Spanish at universities in Argentina, China, Colombia, Costa Rica, Mexico, Spain, United States, and Venezuela. He speaks English and Spanish fluently and can have a conversation in French. Dr. Ferran is a Knight of the Sovereign Military Hospitaller Order of St John of Jerusalem, of Rhodes, and of Malta.
Wizard 20 posts
Followers: 4 people
(10)

I am having trouble understanding blocks in advanced actions. I thought that blocks would execute sequentially and that block 3 would not execute until block 2 ended. But somehow, that is not correct.

I want to be able to do step 1, then do step 2 which is a while loop, and only after that while loop has ended is when I want step 3 to take place. See below.

Is it that all blocks are executed at the same time?

In the above, step 3 is executed long before step 2 ends.

I tried creating several advanced actions and then trying to have one main advanced action that would execute each one of them (like the main program calling several subroutines) but executing an action is not an action that can be included inside an advanced action.

Please help.

Thanks.

10 Comments
2021-11-30 03:01:24
2021-11-30 03:01:24

very helpful comments here thank you

Like
2020-12-16 11:30:39
2020-12-16 11:30:39

Terminology of Advanced actions in:

http://blog.lilybiri.com/advanced-actions-dialog-box-in-captivate-2017

When I have seen how you set up the While loop, maybe have some more links. The While loop, just like ‘Delay Next actions…’ command is continuing even when you have a pausing point or a hard pause.

Like
(5)
(3)
>
Lieve Weymeis
's comment
2020-12-16 19:37:12
2020-12-16 19:37:12
>
Lieve Weymeis
's comment

thanks.

I have been looking at tutorials and reading your blog and I am trying to better understand pausing points and hard pauses. I saw your presentation too. Is there such an object as a “pausing object” or a “hard pausing object”? Or is it that some objects might include it as an attribute inside of them? The presentation explains in detail the difference between them but it does not say how to include, create, or insert one of them. It is probably obvious and I am too dumb to see it.

Like
(2)
>
cferran1
's comment
2020-12-16 19:48:45
2020-12-16 19:48:45
>
cferran1
's comment

Sorry about all those links… The most important blog I wrote in recent years (also the most visited on my personal blog, but disappeared here in the crowd of blogs) is this one. Timeline is one of my favorite topics because tons of questions everywhere proved that many users don’t understand that the timeline is the most important panel in Captivate and mastering pauses and pausing points (which don’t have the same effect) is indispensable. Read this blog:

http://blog.lilybiri.com/pausing-captivates-timeline

It is one of a series of blogs, but this is the most important.

Like
(3)
>
Lieve Weymeis
's comment
2020-12-17 23:38:28
2020-12-17 23:38:28
>
Lieve Weymeis
's comment

Thanks.

Like
(2)
2020-12-16 11:28:06
2020-12-16 11:28:06

The correct term is ‘decisions’, although some label it as Tabs.

Originally my blog was only about using Advanced (and later Shared actions). I have presented multiple times about basics of Advanced actions, some of those presentations/webinars are still as tutorial in my blog.

There are some differences between normal programming and the runtime result (JS) of advanced/shared actions. The most important difference is that you cannot finish an action before the end, all statements/commands are executed top down, and left-right (for the decisions). The While loop is new since a couple of versions and has its own limitations.

Without seeing the advanced action it is difficult to explain in detail what may be wrong in your action. It is often the logic which fails: later decisions overriding previous decisions is typical, long time ago I posted an explanation (still with SWF output). If you have multiple similar decisions I would avoid to use the ELSE part completely. If you can create decisions that cannot have an overlap with other decisions. Of course that is not always possible. Advanced and Shared actions can be very powerful with the right mindset. Even the Adobe team told me several times that they couldn’t imagine that all use cases I published were even possible with those point-and-click actions.

Here is a link to that old post demonstrating a sequence bug:

http://blog.lilybiri.com/blog-after-posterous-clickclick

Like
(5)
(4)
>
Lieve Weymeis
's comment
2020-12-16 19:31:49
2020-12-16 19:31:49
>
Lieve Weymeis
's comment

Thanks.

Sorry that you cannot see the advanced action. I had pasted it into the text and it seemed to be there but it is not in the reviewed version. This time I will type it manually.

Step1
Execute Actions
Assign cf1 with 1
Assign prior1 with cf1
Assign cf2 with 1

Step2
While ( cf1 == prior1 )
Increment cf2 by 1
Assign prior1 with cf1

Step3
Execute Actions
Assign cf2 with 9999
Continue

cf1 is a user variable linked to a dropdown. Thus, when I change the value of the dropdown, the value of cf1 changes. This advanced action is meant to run continuously until the value of cf1 is changed (and that occurs when I select another value in the dropdown).

It seems that Action3 starts before Action2 ends. Is that correct?

I am trying to write a program (advanced action) that has normal statements followed by a conditional statement followed by normal statements. I cannot put the entire program inside a single block/decision because the blocks/decisions are either statements or a single conditional. I tried by using several advanced actions but an advanced action does not seem to be able to call another advanced action. Any ideas on how this could be accomplished?

Thanks for your very detailed responses, here and everywhere else.

Be safe. Be healthy.

 

 

 

 

Like
(2)
>
cferran1
's comment
2020-12-16 20:00:04
2020-12-16 20:00:04
>
cferran1
's comment

Another tip: you need to use the ‘Choose file’ button to add a screenshot to a question or a comment. For an advanced action, please use the Preview button, which is the first (arrow) button in the top right corner of the Advanced Actions dialog box. I already gave you the link to the blog about Advanced Actions dialog box.

In Captivate each simple, advanced, shared action needs to be triggered by an event. Have another blog post with a table with possible events. Your action is triggered by which event?

The second decision is in reality an infinite loop, since you set the value of the variable cf1 to the same value as prior1. Please be consistent with labeling. Captivate is very sensitive to labels being used twice even for a totally different item (can be an action, variable, object, group). I start each name with 1 or 2 characters identifying the type of object: v_one is a variable, tx_one is a text, SV_one is a SVG, Bt_.. a button, SB_ a shape button. Especially in a team the need for consistent labeling is important. Labels are case sensitive.

Second decision repeats a command which has already been done in the first decision (Assign) Have no idea what the last standard decision wants to do? Since you add the Continue command, it means that the playhead will be released with the third decision. Logic is not clear to me. If you attach this action to the On Enter event of the slide, it will not really do anything except incrementing cf2 till?

If you try to tell me in ‘English’ what you want to achieve with that 3-decision advanced action, I could explain if it is possible with an advanced action (without JS) or not, and how that action should look. That could maybe clarify the mindset needed for an advanced or shared (different mindset although many don’t see that) action.  All the exploring I have done since 10-11 years has led to some insight.

Like
(3)
>
Lieve Weymeis
's comment
2020-12-17 23:37:38
2020-12-17 23:37:38
>
Lieve Weymeis
's comment

Thanks.

Step1 is meant to initialize variables.

Step2 is not an infinite loop. It ends when in a separate event the value of cf1 is changed. In other words, Step2 executes until my dropdown box that is linked to the variable cf2 is used and a different value is selected. This is working.

Step3 is what I want done AFTER step2 has ended. Step2 is a while loop and I am not allowed to add anything after the loop (only inside the loop). I assign the 9999 simply to graphically see that it has been executed and when it was executed. I have a textbox that is showing the value of cf2. By watching that textbox, I know when Step3 is executed. But the purpose of Step3 is to continue (releasing the playhead). If I could put Continue after the while in Step2, then I would not need Step3 but as I wrote before I cannot add any commands after the While.

More generally, I am trying to understand how decisions/steps work in Captivate. I had assumed the would execute sequentially and the third step would not start until the second ended and the second would not start until the first ended. But it does not seem to be happening that way.

I agree, there is nothing like experience. That is why I like to play with the tool before developing a serious application. I appreciate your experience.

Thanks.

Like
(2)
>
cferran1
's comment
2020-12-18 09:20:57
2020-12-18 09:20:57
>
cferran1
's comment

There is only one event which will trigger this advanced action. Like in any programming language if you want to have a finite loop with the While condition, you need to have a command/statement within the loop which changes the variable used in the condition. There are not so many examples around for While loops, because there is a slight delay after each cycle. I see a lot more possibilities if that were not the case (like avoiding many duplicate decisions) but at this moment have used it only for state changes and games.

There is no other way to get out of the loop. If there was no third decision, you have an infinite loop because your condition always results in Yes, same as IF 1==1. The third decision will be done immediately after the first and second decision, so it makes no sense. The only way to delay the execution of a command is by using the Delay Next actions… command but the time entered there is absolute.

If you want to see the result of variable value changes the most used debugging is by inserting the variable in a text container (eventually displayed for the rest of the project). I explained this multiple times, the workflow of insertion can be found in a basic article about system variables:

http://blog.lilybiri.com/discover-slash-use-captivates-system-variables-part-1

If you want an example of While looping, use the tags on my blog. There are quite a lot of use cases with step-by-step workflows which you can recreate. I tend to explain why I use some workflows, contrary to just a fixed step-by-step which is a typical domain of passive video.

Like
(2)
Add Comment