• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 15. ActionScripting Applications fo... > Task: Make Buttons That Increase and...

Task: Make Buttons That Increase and Decrease the Alpha Setting of a Clip

This task involves both setting and getting properties of a clip. Here are the steps:

1.
On the Stage you'll need two buttons and one clip. Name the clip instance (as before, not the name in the library) “theClip.”

2.
Attach an evaluate Action to one of the buttons and type theClip._alpha=theClip._alpha-10, as in Figure 15.13. (This means theClip's alpha should be assigned the value of “theClip's alpha minus 10.”)

Figure 15.13. This evaluate Action set theClip's alpha to whatever the clip's alpha is currently minus 10.


3.
The other button should also have an evaluate Action, but with this code: theClip._alpha=theClip._alpha+10.

4.
Test the movie!


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint