How to Fire an Action when a Move Action Completes
December 1, 2015 12:00 AM
Hello,
I was wondering if anyone knows if it is possible to get Lectora to fire an action or action group when a Move action completes?
For example say I have a text box in Lectora that slides in from off the screen. Is there any way to make a button go from hidden to shown as soon as the text box finishes sliding, and not before. Delaying the actions manually isn’t ideal as different sliding animations have different durations.
undefined
Any help on how I could do this or where I could find additional information would be greatly appreciated. I have access to both Lectora 11 and Lectora 12, though the project that this will be used in is being built in Lectora 12.
Discussion (2)
Thanks Darrel,
I have used GreenSock before and was hoping to stay away from bringing in another external library. I was hoping that there would be a solution native to Lectora, but after talking with Trivantis Support it seems like it's just not something Lectora can do.
Sounds like a job for GSAP.
// Function created to show initially hidden button
function myFunction(){
btn.style.visibility = "visible";
};
// Variables created for button and box. Make sure you use the HTML Name in your project
var btn = document.getElementById("button351");
var box = document.getElementById("shape38");
// GSAP Tween animates box from off screen and when movement is complete fires off function
TweenMax.to(box, 2, { x:600, onComplete:myFunction });
See attached. The awt is inside zip too.
Hope this helps.
Darrel
undefined
Discussions have been disabled for this post