ProblemYou want your button to respond when the user clicks on it. SolutionDefine an onPress( ) and/or onRelease( ) event handler method for the button instance. DiscussionButtons can handle a variety of different events, or user actions, including detecting when the user clicks on them. Furthermore, Flash treats each click as two separate eventsthe press and the release. And you can handle each of these events separately by defining an onPress( ) and/or an onRelease( ) event handler method for the button instance. The onPress( ) event handler method is invoked when the user presses the button, and the onRelease( ) event handler method is invoked when the user releases the button. If the terminology and concepts mentioned in the preceding paragraph are unfamiliar to you, or if you don't yet feel very comfortable with ActionScript, don't give up! Even though it may appear daunting at first, the procedure for adding actions to buttons is really not difficult, and it is something you can easily get the hang of with a little practice. No matter what actions you add to a button, the procedure is always the same (and this applies to both button symbol instances and movie clip instances):
|