change images through javascript trigger

May 17, 2021

Is there any way I can change the image with a javascript trigger or access the image variable through javascript?

Say we can access the variables with player.getVar(); how can I access the image variable?

I imported two images into the storyline. After I published it. 

Here is following code I used to check the images:

var ilist = document.images; 

console.log(ilist.length); 

it returns zero which it should return 2 since I have two images in the storyline. 

Be the first to reply