Since you're new to Animate and don't have a background in code, the Code Snippets panel can be very helpful. If you select the option below, your buttons should work as expected:
Here is a super quick working example: Dropbox - button_test
I renamed the functions for easier readability, but the code is the same. I also used frame labels instead of frame numbers, but that's just a personal preference.
I have actually used that exact same code snippet on both of the frames, but it is only working on the first frame. I've also made sure to correct the frame number the code is referring to in each instanc. So where am I going wrong?
1 person found this helpful
I figured it out, I was referring to the wrong frame number as I had to subtract 1 from each frame number when working with easelJS.
Thanks for your help though
Glad you got it working.
That's one of the reasons I prefer frame labels. You can also give them more intuitive names relating to your content so it's easier to stay organized, and if you ever change the length of your timeline or rearrange frames, you won't have to change the frame numbers in your code.