How to make MouseOver and Click button?

Posted on June 22, 2008. Filed under: Flash Script | Tags: |

import mx.transitions.Tween;
import mx.transitions.easing.*;

for (i=1; i<=8; i++) {

var current_btn = this["my"+i+"_btn"];

current_btn.onRollOver = function() {
var currentAlpha = this.cover_mc._alpha;
var myHoriTween:Tween = new Tween(this.cover_mc, “_alpha”, Strong.easeOut, currentAlpha, 0, 0.5, true);

};

current_btn.onRollOut = function() {
var currentAlpha = this.cover_mc._alpha;
var myHoriTween:Tween = new Tween(this.cover_mc, “_alpha”, Regular.easeIn, currentAlpha, 100, 0.5, true);
gotoAndStop(20);
};
}

stop();

my1_btn.onRelease = function(){
gotoAndStop(21);
}
my2_btn.onRelease = function(){
gotoAndStop(22);
}
my3_btn.onRelease = function(){
gotoAndStop(23);
}
my4_btn.onRelease = function(){
gotoAndStop(24);
}
my5_btn.onRelease = function(){
gotoAndStop(25);
}
my6_btn.onRelease = function(){
gotoAndStop(26);
}
my7_btn.onRelease = function(){
gotoAndStop(27);
}
my8_btn.onRelease = function(){
gotoAndStop(28);
}

Make a Comment

Make a Comment: ( None so far )

You must be logged in to post a comment.

Liked it here?
Why not try sites on the blogroll...