by d-soldier » Sun May 20, 2007 7:38 pm
There should be very little code involved... it's all events. Broken down:
Create an actor to be a button.
Create two seperate animations for the actor (they can be a single frame, but make them different).
Under the actor controls, add both animations to it seperately (would be easiest to name them "on" and "off". Be sure that the actor starts with "off" (by having the "off"animation displayed in the actor-control animation box).
Now click on events/add, mouse enter,add action, change animation, change "animation" to "on", then click the add button, for immediate action.
Now click on events/add, mouse leave,add action, change animation, change "animation" to "off", then click the add button, for immediate action.
Run the game, and move your mouse over the button, the animation will change if you set it up correctly, and change back when the mouse leaves it.
All thats left is to set up a mouse-button-down event, to do whatever you want to do when it is clicked.