![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
A command in ActionScript is called a function. A function is a script that you can write once and use repeatedly in a document to perform a certain task. You're going to write a function that makes the screen_mc movie clip appear (visible = true
) when the user releases the mouse button.
//function to show animation
.onRelease
from the list of code hints that appears.= function(){
The line of code that you just completed should appear as follows:
this.onButton_btn.onRelease = function(){
You already know how to select objects in the Insert Target Path dialog box; you'll now enter the instance names directly into the Script pane.
screen_mc._visible = true;
};
to specify the end of the statement.
The function should appear as follows:
//function to show animation this.onButton_btn.onRelease = function(){ screen_mc._visible = true; };
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |