Forum Discussion
Storyline 360 drag-and-drop issue: object moves away from cursor after state change
Hello ali066khan
I hadn’t seen your suggestion before posting mine. I really did try, but unfortunately, SL doesn’t allow you to place the JS trigger at the end of the sequence, regardless of the condition used to trigger it—it always goes at the beginning. So your clear sequence can’t be applied. Therefore, there’s an event missing to trigger this JS code. Unless you’d like to provide further details.
Furthermore, this doesn’t solve the problem (THE problem) of the misalignment between the clicked object (H328 pixels even though it displays the Normal state) and the cursor.
However, there might be a way forward.
Another two hours, and this Assistant still doesn't know any more than I do about how SL works. No progress, no results. I’m still running into the problem that I’m working with an H328pix shape that displays the Normal state of H48pix. The predefined states (in a drag-and-drop) apparently can’t be fully manipulated or accessed via JavaScript (I seem to recall having encountered this problem before). But if I give up on the drag-and-drop activity and use only triggers (Change the object’s state when the user moves the object onto… or when the interaction between the object and the target area ends…), I’m stuck there too. I’m giving up. Sorry ArminBaghaei
- ronald-hicks24 days agoCommunity Member
Don't give up yet, Thierry — your finding is actually useful, because it confirms why the JavaScript route is a dead end here. The two-object approach in my comment above sidesteps it completely: no predefined-state manipulation at all. One small object is the only draggable, and the big visual just sits underneath it, swapped by state changes on the non-dragged object. No JS, no drag-anchor math. Worth a quick test before you scrap the drag-and-drop.
- ArminBaghaei22 days agoCommunity Member
Hi Thierry
I do appreciate your kind support. I even tried to change the object's anchor, meaning positioning the "Drop Correct state" object in the middle of it when the user drops this on. I hope I was clear enough.