Access to HTMLImagElement?

Problem:
Is it possible to access to HTMLImageElement contained with an Image ActivePresenter’s object ?
I would need just the same as mediaPlayer() for Audio/Video’s AP_object.

ActivePresenter version:
9.0.7

OS:
Windows10

Notes:

Hi,

You can use imageNode property to access the HTMLImageElement from the ActivePresenter Image object.

Regards

1 Like

Great :grinning:. Thank you so much Toan : it’s working.
It could be very useful to integrate this property in the Manual.
Regards

1 Like

Hello Toan. A little bit further…how to change filling image for a Drag&Drop Source ? Thanks in advance

Hi @pbouille,

You should add another state for your drag source, change its filling image and use a Change Object State action to switch to that state in the output.
For more information about object states, please read this tutorial:

Regards

Hello, and thanks, Toan.
I think I understand the use of Object states, but I would need to dynamically load the filling images of dragged objects. Is it possible ? (just like ImageElement objects, but with dragged objects)
Regards

Hi @pbouille,

Unfortunately, there’s no public JavaScript function to change the filling image.

If you just need to switch between several filling images, you can use the object states as I mentioned.
The states are defined in editing process but can be changed dynamically in HTML5 output (using Change Object State action, or object.state('state name') function).

You can also use image objects for drag sources to utilize your script for images.
Just click the image icon in the drag source placeholder and browse for the image:
image

Regards

It’s just this setting which would be very useful at execution time, to make more adaptative projects.
I notice that it isn’t possible.
Thanks Toan

1 Like