Copy link to clipboard
Copied
I've created an online quiz that tells you how many days you'll last if cats take over the world. If you want to try it, here's the link:
http://www.curtisjenkinsportfolio.com/Cat%20Take%20Over.html
However, I can't get the action script to properly count up the number of days you'll last. I've found plenty of advice for creating a counter, but they always reset at the end of the scene. Since each question is it's own scene, I need the counter to continue throughout the entire project. Can anyone help?
Copy link to clipboard
Copied
if you create a variable that's not a reference to an on-stage object, it will not reset when scenes change.
Copy link to clipboard
Copied
Wow, that brought me down a rabbit hole. Now I'm having a really hard time creating any kind of counter without having to know quite a bit of coding. Any ideas?
Copy link to clipboard
Copied
// execute once to create your counter and initialize its value.
var counter:int = 0;
//everytime you want to increment your counter, use:
counter++;
//everytime you want to decrement your counter, use:
counter--;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now