Animate - Built in functions?
Hi, I'm converting an old Actionscript 1 Flash project to HTML5 Canvas (Javascript), and wondering if there are any built-in functions or global variables I can access, such as the Timeline's current frame number?
I have tried the following, but it is alerting as 'frameNumber=undefined'
/*
Get the frame number of current frame
*/
var frameNumber = _this.currentFrame;
alert("frameNumber="+this.frameNumber);
POST SCRIPT:
I changed the above to
/*
Get the frame number of current frame
*/
var frameNumber = _this.currentFrame;
alert("frameNumber="+frameNumber);
and it worked. I don't udnerstand the use of or scope of the "this". Would someone be willing to explain it?
Also, do both these lines of code need to be inserted in every frame I want it displayed, or is there a global function way of accessing the framenumber, with simply (something like):
alert("frameNumber="+frameNumber);
Thanks,
Geoff
