Skip to main content
Participant
December 14, 2017
Question

A little help with java script

  • December 14, 2017
  • 0 replies
  • 135 views

Can anyone please help me out? I contacted Adobe and was told that they could not help with Javascript. I am trying to make the character in my project move using buttons. The character moves fine unless you want him to go a different direction and then he gets moved back to the starting position. This is done in Javascript because the states do not work right in Adobe as compared to Storyline.

This is the script that i am currently using.

var obj = document.getElementById( 're-SVG_1c' );

var posX = parseInt( obj.style.left );

var posY = parseInt( obj.style.top );

obj.style.left = ( posX + 10 ) + 'px';

cp.changeState("SVG_1","right_1")

This topic has been closed for replies.