Copy link to clipboard
Copied
I'm having a strange problem with a Flash project; I've already spent half an hour trying to diagnose and fix the issue and I'm utterly stumped. Hoping someone else has an idea.
My friend and I have been working on a game for about a year. There's a few buttons on the stage that have been on the stage for six months, and always worked fine, but today my friend moved them and I just realized they don't work anymore. They are literally completely unresponsive to all mouse input, they have event listeners for mouseover and click but the events never get triggered (I checked for sure with breakpoints and traces).
I tried the obvious things first; move the buttons to the top layer and set .mouseEnabled = true, but that didn't do anything. I tried moving them around the stage in case something invisible was covering them but that didn't work.
We've got one button instance named "btnSell" that is broken, and another named "btnMenu" that works. They are instances of different objects in the library, but I tried swapping their instance names on the stage; then "btnMenu" was broken and "btnSell" worked.
So I swapped the names back, deleted the broken "btnSell" and created a new instance from the library. Only, it still doesn't work.
My friend deleted a bunch of old and no-longer-used assets, including previous versions of the PNGs that make up those buttons, so maybe that's related to the problem? I'm really confused and frustrated. I could probably reimport the graphics and make the buttons from scratch but I'd really like to figure out what's causing the problem.
Any ideas? I'd much appreciate it.
Copy link to clipboard
Copied
If you've only spent half an hour trying to find out what happened, that really isn't much time at all as far as troubleshooting things goes.
One thing you can probably do is create a new button and insert it the way it was before the change occured and get it working. Then have your friend repeat what was done so that you can better see how that button might have been disconnected from its functionality. If you are not getting error messages, then whatever your friend did to move the buttons did not disconnect them from the code, so it is possible you have different instances (keyframes) of the buttons and the ones that eventually remain for interaction are not the ones that have the code assigned to them.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now