Hi all,
how can I get a Random Number in a Text by clicking a button?
For example: I have an already animated object [a dice] as button and I have a Text object located on other part of the stage and where should appear the random number from 1 to 6.
I have tried in CreationComplete and compositionReady, and in the Click option in the button, one of these two options:
Math.floor((Math.random()*6)+1);
var ran_number=Math.floor(Math.random()*5;
I have also tried in the dice image [button] within the symbol this [with one of the two previous codes]:
sym.getComposition().getStage().$("text").html(ran_number);
And it doesn't work anyway. Right now I'm basically lost.
Can anyone help me with this issue? [considering I'm a grown child-man, which means that help would be like: 1.- start your computer. 2.- open Edge. 3.- etc etc etc] ;-)
Many, many thanks in advance.
Armando.