Getting name from object in JS


I run some JS code as an event triggered by clicking on an object called ‘square’.
In the JS code I want to work with the name of that object. I tried to assign ‘name()’, ‘’ and ‘’ to a variable, but neither worked. ‘’ gave me the name of the project, as expected. Where is the mistake?
Thanks for your help,


ActivePresenter Version: 8

OS: Win10


Hi Rolf,

Please use to get the current object name. You should place this code in the event of the object.

In addition, in any JavaScript action, you can use the following variables:

  • this : the current target object that handles the event.
  • e : the event object. It may provide some useful information for some events. For example, e.value in a On Accept event is the drag source that is dropped.
  • prez : the presentation.
  • AP : the player.


Thanks, Nam.

Best, Rolf