When you have adopted me since some time, you already know that I’m an awesome fan of Shared actions. Nonetheless I’m conscious that many builders appear to be afraid of these shared actions. On this submit I’ll attempt to demystify the ‘shared motion’, and reply some questions.
To begin with: the most important benefit of a shared motion is its reusability. Everytime you want an motion which will likely be used a number of instances in a challenge, or which you propose to make use of in a couple of challenge, it’s worthwhile to think about using a shared motion. Listed here are another causes. You possibly can skip this half and are available again to it later:
- When used inside one challenge, you might be utilizing situations of the identical shared motion. Should you choose utilizing duplicated and edited superior actions the file dimension will likely be larger. It may be in contrast with using a number of situations of the identical graphic/audio clip.
- Shared actions seem within the Undertaking Library with all of the functionalities of Library property: what number of instances makes use of, on which occasions and many others..
- You possibly can switch an present superior motion to a brand new challenge utilizing copy/paste of the thing triggering the motion: a button, click on field, TEB (success/Final try occasions), slide (Enter/Exit occasion). If variables are used within the superior motion, they are going to be created within the new challenge. Nonetheless, in lots of instances, instructions within the superior actions will revert to Proceed if what they’re referring to will not be out there within the new challenge. Instance: lacking slides for navigation instructions, lacking states and even multistate objects…
- Transferring a shared motion to a brand new challenge is a breeze: drag the motion from the unique Library to the Library of the brand new challenge. Variables which aren’t used as parameters will likely be created (much like copy/paste for superior actions). Because the shared motion will not be linked with any occasion, you don’t should trouble about having every little thing in place earlier than transferring the shared motion. In each instances person variables which aren’t outlined as parameters, will likely be created within the new challenge.
- There isn’t any built-in solution to doc Superior actions in Captivate. A shared motion nonetheless permits so as to add an outline to the motion and to the parameters if any are used.
There are some limitations to shared actions:
- It’s not attainable to set off a shared motion from a hyperlink.
- You can’t attribute a shared motion to a number of occasions directly, as is feasible for a complicated motion.
Beware: not all superior actions are suited as shared motion. In a latest submit about ‘Trace after x failed clicks’ I defined a use case which was meant as introduction for Captivate customers new to variables and superior actions. You will have a have a look at that first weblog submit:
It’s a good suggestion to create and take a look at the motion as superior motion earlier than creating the shared motion. This was the superior motion created within the talked about weblog submit, triggered by the Success occasion of the ‘fallacious’ hotspots (5) within the instance:
Two person variables had been used:
- v_attempts tracks the variety of clicks on the button/hotspot
- v_failure is used within the Failure suggestions message and permits to vary the content material of that message. The default failure message will likely be changed by a Trace message after the outlined variety of clicks.
First model Shared Motion
Open the superior motion within the dialog field, use the button Save as Shared motion, and this dialog field will seem:
Within the screenshot you see that I’ve stuffed within the description. You will need to achieve this, attempt to clarify briefly sentences what the motion will do precisely. It might appear a lack of time, however should you reuse the motion a few months later, you’ll perceive why I emphasize this.
In the principle half you see the ‘parameters’, and on this explicit case all of them present the inexperienced verify mark. This implies you can save the shared motion as it’s. Outcome will likely be that the parameters stay static, can’t be modified once you connect the motion to an occasion. They won’t want an outline neither. Evaluating with the superior motion:
- The outline of the motion, which is unimaginable for a complicated motion.
- Its look within the Undertaking Library with all of the performance of different property.
- For reusability in one other challenge: you may drag the shared motion from this library opened as exterior library to the Undertaking library of the brand new challenge. For a complicated motion you would want to repeat/paste one of many fallacious hotspots to the brand new challenge.
- You can’t connect the shared motion to all fallacious hotspot occasions directly, you must do it one after the other. The superior motion could possibly be hooked up in a single workflow by deciding on all of the fallacious hotspots.
- For an additional hotspot slide in the identical challenge it is going to be simpler to create a replica superior motion, and edit the Trace textual content (worth for the variable v_failure).
Second model Shared motion
Within the first screenshot I marked two parameters with a query mark:
- Parameter ‘2′: literal indicating the variety of required fallacious clicks earlier than displaying the Trace.
- Parameter ‘Click on on the icon ‘Responsive challenge”: the brand new worth (literal) for the variable v_failure to interchange the failure textual content by the Trace textual content.
You can also make the static parameter dynamic by clicking the verify field, and getting into an outline for the parameter. To me a very powerful candidate is the Trace textual content. Making that parameter dynamic, means you can enter a unique Trace textual content for every new attachment of the motion to an occasion. Beware: the right checkmark will solely seem after confirming the outline of the lively parameter:
This makes the motion versatile: you solely should enter the Trace textual content as parameter everytime you connect the shared motion to an occasion.
- Apart from the outline of the motion, the that means of the parameter will seem everytime you apply the shared motion.
- Its look within the Undertaking Library.
- Reusability in any new challenge stays.
- File dimension will likely be decrease in contrast with utilizing duplicate superior actions.
- You possibly can edit the Trace textual content for every occasion.
- You can’t connect the shared motion to a number of occasions directly.
- That you must fill within the textual content parameter with every attachment (copy/paste is feasible)
Third model Shared motion
You can also make the motion much more versatile by declaring the variety of fallacious clicks to be a dynamic parameter. Utilizing that shared motion you’ll be capable of change the variety of fallacious clicks earlier than displaying the Trace as a substitute of the Failure message. Like growing the quantity for a extra sophisticated hotspot slide. I don’t have to clarify this screenshot anymore:
I’ll write out one other weblog submit to reveal using the shared motion defined right here as template for superior actions extending the Trace message to graphical property.
If you wish to study extra about utilizing Shared actions, please take a look at my ‘crash course’, studying how you can use a shared motion. For each classes you’ll have each a video strategy and a step-by-step strategy, your alternative. You possibly can nonetheless obtain the examples.
To avoid the “Con” of shared actions not having the ability to apply to a number of occasions directly, bear in mind you can simply create a complicated motion from a shared motion. Right here is an instance: