Other Drag and Drop objects moved after a drag item is dropped to the target.

I tried to look for this solution here in the forum but did not find it. The issue is the other objects moved after an item is dropped to the target. This happens after the Try Again layer is hidden. These objects have motion path trigger, in the Try Again and Incorrect layer -- to reset them to the initial location. Since the slides cannot be reset to initial states in the Question Bank, I tried to reset the drag and drop items' location using a motion path trigger.  Any thoughts to resolve this issue?

I attached the Storyline file for further perusal.

4 Replies
Pierre Jouan
RANDY NOVION

Hello Pierre,

 Thank you for your response and suggestions. I looked into the first link you suggested. I already used this process to reset the object's position to its initial state. I also looked into the second link you suggested. That way is using a Result slide which my slide does not need to go. I just want the other answers (drag items) to not move when an item is dropped to the target. This movement happens after the Try again layer is hidden.

Math Notermans

With a bit of Javascript magic anything is possible.

returnpos

In the first Javascript that gets triggered on timeline start i get the x and y position of the A,B,C characters at start. As they get randomly shuffled that can change. As scope is a big problem in working with Javascript in Storyline we need to save those values to Storyline variables so we can get to them when needed.

And that is in the second trigger. I added a variable 'tryingAgain.. default that one is false, so when on the 'Try Again' layer you click.. the value is set to true.

As the trigger on the base timeline is checking for a change on that variable and if its true, it will be triggered the moment the 'Try Again' layer closes and executes. This Javascript gets the x and y positions we previously set from Storyline and then animates all elements to their original position by calling a function 'resetChoice'. I did add some easing in the animation... easeArray[0]..
so it uses the easingtype at the first spot in that array ( Bounce.easeOut )... if looking properly you see the not-choosen characters bounce a little. If you want you can try the other eases by changing the ease... up to...easeArray[6]. Using the last one...makes for a straight linear animation without any easing.

Adding the Storyline so you can test it yourself.

RANDY NOVION
Math Notermans

With a bit of Javascript magic anything is possible.

returnpos

In the first Javascript that gets triggered on timeline start i get the x and y position of the A,B,C characters at start. As they get randomly shuffled that can change. As scope is a big problem in working with Javascript in Storyline we need to save those values to Storyline variables so we can get to them when needed.

And that is in the second trigger. I added a variable 'tryingAgain.. default that one is false, so when on the 'Try Again' layer you click.. the value is set to true.

As the trigger on the base timeline is checking for a change on that variable and if its true, it will be triggered the moment the 'Try Again' layer closes and executes. This Javascript gets the x and y positions we previously set from Storyline and then animates all elements to their original position by calling a function 'resetChoice'. I did add some easing in the animation... easeArray[0]..
so it uses the easingtype at the first spot in that array ( Bounce.easeOut )... if looking properly you see the not-choosen characters bounce a little. If you want you can try the other eases by changing the ease... up to...easeArray[6]. Using the last one...makes for a straight linear animation without any easing.

Adding the Storyline so you can test it yourself.

Hello Math,

Yeah, javascript is amazing. Thank you! Appreciate this so much. I will try this and will let you know about this magic spell casting javascript if I can do it.