ActivePresenter Saola Animate Pricing Download

Drag source and Drop Target

Problem: I have lot’s of drag source shapes and 4 drop targets and I want to execute some Javascript when a particular drag source is dropped into a particular drop target but not when others are. Is there a way of identifying which drag source has been dropped into which drop target so I can run code based on this.

ActivePresenter Version: 7.5.11

OS: Win10

Notes: I’m not using Drag and Drop Questions, just shapes that have been designated drag sources and drop targets.

Hi,

Yes, you can identify the object by its name through Javascript code. For example:

  • Get the current target object name of the event: e.target.name(). It will be the drag source name if you are in the event function of a drag source. Or it will be the drop target name if you are in the event function of a drop target.
  • Get the dragging object e.value.name(). Use this function in the event of a drop target to get the name of drag source.

Please see my example project for details: drag-drop-name.approj (340 KB)
Regards,

Thanks. I’m unable to open the example project though as it says it was created using ActivePresenter 8.

Hi Scott,

I’ve updated the project in the post of @namnt, please check it again.

Regards

That’s great. Thanks for your help.