run an action group AFTER a move action

rbeutel4797
rbeutel4797 Community Member Posts: 13
Is there a way to run an action group AFTER a move action completes?

Comments

  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    with Javascript sure...pure Lectora actions...have to check... :-)

    No easy way to do with just plain Lectora actions. Your best bet is doing the move with GSAP. GSAP has a command OnComplete for its timeline. In fact in a TweenMax timeline you can add sequences of actions after each other,,, they all wait for the previous to end... check my portfolio and samples and you sure find a suitable sample.

    Checking my own portfolio here some samples that are usefull to solve this.
    If you know the position of an element...well you can trigger whatever action needed when the element is higher then a certain amount...
    https://community.trivantis.com/shared-content/get-an-elements-position/
    This one does show quite well the possibilities of a sequence with TimelineMax for GSAP
    https://community.trivantis.com/shared-content/sequencing-with-gsap-timelinemax/

    Kind regards and good luck,

    Math
  • klaatu
    klaatu Community Member Posts: 988
    Well, I'm making assumptions because there's no sample included with your post. If you want to initiate a move and then, when it completes, automatically fire off an action group it's extremely simple. Lectora actions fire in sequence. Add a run action group after the move action.

    I added a delay before the action group fires so that you see it indeed happens after the move finishes. without a delay it will look simultaneous.

    If this is not what you meant, please elaborate and include a sample.
  • _
    _ Community Member Posts: 84
    It would be GREAT if Lectora actions had a checkbox 'Wait until previous action complete' (or even a dropdown menu 'Wait until <X> action complete'. Best would be some kind of timeline (like Premiere, AfterEffects) to show visually when an action in a group will fire and how long it will run for.

    Setting delays can get extremely fiddly, especially when you have fade transitions with varying speeds and a bunch of MoveTo actions thrown in the mix. It gets even worse when you need to go back and add something to the middle of of a long animated sequence and have to re-time the values!

    Animated elements and nice transitions go a long way in terms of user experience and engagement with the learning, but building sequences that have more than ten or fifteen steps gets prohibitively complex.

     
  • rbeutel4797
    rbeutel4797 Community Member Posts: 13
    Animated elements and nice transitions go a long way in terms of user experience and engagement with the learning, but building sequences that have more than ten or fifteen steps gets prohibitively complex.
    I totally agree.

    Maybe add a "THEN" condition next to the "IF" and we could string tasks within an action.
  • klaatu
    klaatu Community Member Posts: 988
    Delays are not necessary. By his question, Rob just needed to be pointed to the run group action and to be reminded that Lectora actions are sequential.
  • rbeutel4797
    rbeutel4797 Community Member Posts: 13
    @Darrel - Your insight was very much appreciated. Despite the fact the actions are sequential, they were happening way too quickly. I needed the move action to happen and then, after it stopped, the next action would run. Unfortunately, I have several buttons launching different move actions with varying distances. That along with the users browser or computer/bandwide speed means the delay would need to be different for each.

    This is how I solved my issue:

    Math provided a useful piece to the puzzle. I used his idea to track the location of the object that is being told to move. When one of the buttons are clicked the target location is set and the object is told to move. I then created a looping action (with a 0.1 delay otherwise you get an "out of stack space" error) that tracks the object position and stops when the target position is reached. At that point the next action group runs. When I can find time I will created a simplified version without the confidential info.

    @mnotermans - Thank you but your avitar still freaks me out.
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!