@JoãoCésar17023019

Hi.
Sorry for the delay and thanks for the file you sent to me.
I'm not sure if this is what you want, but here is a possible solution:
var root = this;
var total = 0;
function fl_d()
{
this.Dice.play();
this.but.visible = true;
this.boy.gotoAndStop(0);
}
function fl_MouseClickHandler()
{
this.Dice.stop();
this.but.visible = false;
total = this.Dice.currentFrame + 1;
if (total == 1)
{
this.boy.targetFrame = 21;
this.boy.play();
}
else if (total == 2)
{
this.boy.targetFrame = 39;
this.boy.play();
}
}
function fl_tickHandler()
{
if (this.boy.currentFrame === this.boy.targetFrame)
this.boy.stop();
}
this.stop();
this.Dice.stop();
this.but.visible = false;
this.boy.stop();
this.Dice.addEventListener("click", fl_d.bind(this));
this.but.addEventListener("click", fl_MouseClickHandler.bind(this));
createjs.Ticker.on("tick", fl_tickHandler, this);
One of the reasons your code didn't work is that you were checking the boy's current frame on click only and you should be checking for it constantly.
I hope this helps.
Regards,
JC