Sunday, October 24, 2010

PE_6

More Action Script:

In order to implement any action in Flash, it starts with a click of a button or a keyboard button.

The following code is used for developing this interactivity:



/* Mouse Click Event
Clicking on the specified symbol instance executes a function in which you can add your own custom code.

Instructions:
1. Add your custom code on a new line after the line that says "// Start your custom code" below.
The code will execute when the symbol instance is clicked.
*/

button_1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

function fl_MouseClickHandler(event:MouseEvent):void
{
// Start your custom code
// This example code displays the words "Mouse clicked" in the Output panel.
trace("Mouse clicked");
// End your custom code
}

No comments:

Post a Comment