Thank you, AMULI but I am so bad in coding that I do not understand most of the writings. I will explain my problem; There were sample codes in Animate CC Random number generation code; function fl_GenerateRandomNumber_4(limit:Number):Number { var randomNumber:Number = Math.floor(Math.random()*(limit+1)); return randomNumber; } trace(fl_GenerateRandomNumber_4(100)); AND Next frame pass code; newnumber.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame); function fl_ClickToGoToNextFrame(event:MouseEvent):void { nextFrame(); } My question is; How do I add this code any button? For example, I have a button which name is "newnumber" and I want, when I click this button, it goes to random frame
... View more