Moving button to a variable position

Rollover and click the properties image on the left to see what to click and the bigger window.

Clicking these buttons will respectively change the X/Y position of the 3 crosses and make the button move randomly to 1 of the three

To ensure it is good reusable i used a Javascript that gets the position of the crosses from Lectora and sets those X/Y positions as variables in Lectora. The rest is standard Lectora. A few variables to ensure the button hops from cross to cross on a click. Resetting one of the used variables to 0 when over the max amount.


To show the reusability i added buttons for some random changes. For the random movement some variables were added too. Notice that you have to call the Javascript to get the new positions of the crosses after you changed positions randomly.

On the forum i noticed a thread about moving buttons on a click. Although a solution to this came along quite quick, i couldnot resist to make my own solution for it.