Blurring a Picture - Method 2: Blurry Cat using ActionScript Fading; Step Six: The Button ActionScript
Posted by : PhilS on Sep 30, 2008
Method 2: Blurry Cat using ActionScript Fading[/st]If you have used the Tweening Method (1) and followed all the steps above you have finished your Movie. For Method 2 you need to complete Steps 1 to 5 above except for step 4.
Step Six: The Button ActionScript[/st]
- Select the invisible button by clicking on it: Button
Open the Actions Panel and type the following code:
on (rollOver) { //when you rollover set the variable dir (which stands for "direction of fade"). In this case a dir of 1 will make the "Cat Fader" clip fade in (see below to see how dir affects the fading). _root.dir = 1; } on (rollOut) { //upon rollout, change dir to -1 for a fadeout of "Cat Fader" (see below...) _root.dir = -1; } on (release, releaseOutside) { trace("Meow!"); //put your code to do something, like gotoAndPlay to another frame of your choice, here. }

no comment
Add comment