I’m making a simple spot-the-ball the game and if the user clicks in the incorrect place then I would like to make a cross appear where they have clicked i.e a movieclip appears at the position the mouse has been clicked. I would prefer to attach the code to the button as I understand this a little better.
Yes exactly like that thank you very much except there are 7 games in all each with 3 attempts to get it right. So what would I need to do to clear the x’s from the screen from one game once the user presses a button to continue onto the next game?
make the movieclip containing your cross, then from your library, right click on it and linkage then mark export for AS then give it an id name, c for instance… then place this code in your action pannel
just one last thing, I want to attach this to a hotspot which denotes the area of the screen where the answer is incorrect and I’ve defined this with an invisible button.
This hotspot already has this code attached to the button itself:
With the code you have just given me I’ve tried adding in the instance name of the button to the function so that: _root.onMouseDown = function() becomes _root.incorrect_btn.onMouseDown = function() but this doesn’t work!
i’m no expert by any means but I’m guessing that by having code attached to the button as well as in a function means that flash is getting confused? How would I combine the above into the function you’ve given to me?