Error Symbol=GUN, layer=Prev, frame=1:Line 1: Statement must appear within on handler
this.onRelease = function()
Total ActionScript Errors: 5 Reported Errors: 5
I’m still fairly new to flash but I just CANNOT find why this code is not working. Especially since it is mostly cut and pasted from a document where it works perfectly. WTF is wrong???
If you can’t make a piece of code work, even when all logic says it should, then why not try finding a different way of doing it.
I have looked at the code in your fla posted on your other thread and one problem is the ‘this’ in your button code seemed to reference the gun not the button.
I quite often trace(this) to make sure i’m pointing at the right object, because it doesn’t always work as i imagine.
I was messing around with your fla and got this far…
omg thanks guys. I was losing my mind but I’ve finally got it to work. Ended up using the controller mc. I just deleted all the code and rewrote it completely, targeting evertything with absolute paths. Still don’t understand why it wasn’t working but the important thing is that I’ve done it finally. Cheers to all who helped. :thumb: