Forum Discussion
DaveHendry
11 months agoCommunity Member
SL javascript eventListener for drag events
I am trying to add an event listener to a storyline 360 object using javascript. If the event listener is for a click, it works. But if the event listener is for any kind of dragging event, it doesn'...
- 11 months ago
Yes, i use GSAP drag with events. Works fine.
DaveHendry
11 months agoCommunity Member
Thank you both. AdamZamczyk, I did implement what you recommend for a drop event involving the same object; the difficulty was that I needed triggering based on dragging only, for 279 separate elements, which I could do in SL but found onerous and unreliable. That's why I wanted to use javascript, but what I've found is the triggered javascript code apparently does not recognize drag events. So I ended up using a workaround based on the position of my draggable object (using getBoundingClientRect(). MathNoterman-9, I understand that I could also do it with GSAP, thank you.