Trying to communicate with Adobe Animate Web Object

Jun 21, 2023

Hey All,

I am able to publish and view an Adobe Animate canvas in SL but what I am trying to do (unsuccessfully)  is have it adjust variables when a user clicks a button in the web object. I am placing this code on a button and then trying to see if the variable, "animationComplete" updates in SL when I run the course:

 

_this.trigger2.on('click', function(){
/*
Play a Movie Clip/Video or the current timeline.
Plays the specified movie clip or video.
*/
_this.text_2.play();
var storylinePlayer = parent.GetPlayer();
storylinePlayer.SetVar("animationComplete",true);
});

 

The button does play the movie clip in the web object but the variable is not updating in SL. If anyone has an idea/suggestion/solution, I would be most grateful.

Thanks!

1 Reply