Question
Animated Button Problem with Depths I Think
I have an animated movieclip ("b1Animated") lying on top of
an invisible button ("b1"). When the user mouses over the large
invisible button I want the animation to kick in - its a rectangle
that grows and changes alpha. It *kinda* works but holding the
mouse over the center causes some crazy back and forth because of
depth problems, methinks.
Can someone help and have a look?
Appreciate it - Paul
file: http://www.mediafire.com/?e744uux1q3w
code:
import caurina.transitions.*;
//soundEffect in library has linkage "soundEffect"
var soundOnOver:soundEffect= new soundEffect();
//b1 button is invisible
//b1 animButton is the white square that grows and shrinks
this.b1.addEventListener ('mouseOver', function() {
//trying to make sure the invisible buttons remains on top
//addChild(b1);
soundOnOver.play();
Tweener.addTween(b1Animated, {alpha:.9, time:3, transition:"easeOutCirc"});
Tweener.addTween(b1Animated, {scaleX:180, scaleY:220, time:3, transition:"easeOutCirc"});
});
this.b1.addEventListener ('mouseOut', function() {
Tweener.addTween(b1Animated, {alpha:.01, time:1, transition:"easeInCirc"});
Tweener.addTween(b1Animated, {scaleX:1, scaleY:1, time:1, transition:"easeInCirc"});
});
Can someone help and have a look?
Appreciate it - Paul
file: http://www.mediafire.com/?e744uux1q3w
code:
import caurina.transitions.*;
//soundEffect in library has linkage "soundEffect"
var soundOnOver:soundEffect= new soundEffect();
//b1 button is invisible
//b1 animButton is the white square that grows and shrinks
this.b1.addEventListener ('mouseOver', function() {
//trying to make sure the invisible buttons remains on top
//addChild(b1);
soundOnOver.play();
Tweener.addTween(b1Animated, {alpha:.9, time:3, transition:"easeOutCirc"});
Tweener.addTween(b1Animated, {scaleX:180, scaleY:220, time:3, transition:"easeOutCirc"});
});
this.b1.addEventListener ('mouseOut', function() {
Tweener.addTween(b1Animated, {alpha:.01, time:1, transition:"easeInCirc"});
Tweener.addTween(b1Animated, {scaleX:1, scaleY:1, time:1, transition:"easeInCirc"});
});