convert as3, to java script
Hi,
I want to convert as3 code from flash, to java script to use in the html5 canvas.
Any help please?
This is a as3 code:
var randNum:Number = Math.floor(Math.random() * 149) + 1;
var fixedFrame:Number = randNum + 1;
gotoAndStop(fixedFrame);
I try this but not working:
function myFunction() {
var randNum = Math.floor(Math.random() * 150) + 1;
var fixedFrame = randNum + 1;
_this.gotoAndPlay(fixedFrame);
}
