Copy link to clipboard
Copied
Hi all, using a score to direct people to their correct finished screen. I am using HTML5 canvas and CreateJS.
this.nxt.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));
function fl_ClickToGoToAndStopAtFrame()
{
if (score >= 3) {
gotoAndStop(50);
} else if (score <= 4 && score >= 8) {
gotoAndStop(51);
} else {
gotoAndStop(52);
}
}
However, it seems it doesnt want to play ball, any help is greatly appreciated. Thankyou.Adobe Animate CC - Home
I think that with JavaScript 'this' is never implied. So, this.gotoAndStop(50) might work better.
Also, read your lines and think through what will happen. You have two tests that a score of 4 would match, and you have a line where you're testing for <=4 and >=8. What number could match both of those things?
Copy link to clipboard
Copied
I think that with JavaScript 'this' is never implied. So, this.gotoAndStop(50) might work better.
Also, read your lines and think through what will happen. You have two tests that a score of 4 would match, and you have a line where you're testing for <=4 and >=8. What number could match both of those things?
Copy link to clipboard
Copied
Thanks for that, I knew something didnt look right.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now