VR Course Contest

Show us your best virtual reality course and win $50 gift card and a winner badge!

How to Fire an Action when a Move Action Completes

mmackinnon2873 Community Member Posts: 6 ☆ Roadie ☆

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.


I plan on using this to fire JavaScript functions with specific timing if it makes a difference.


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.


  • klaatu
    klaatu Community Member Posts: 988
    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.


  • mmackinnon2873
    mmackinnon2873 Community Member Posts: 6 ☆ Roadie ☆
    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.
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!