The following code is my attempt to fade out current clip then to fade in selected clip via one onRelease command. Here’s the code. Can someone set me straight?
import gs.TweenLite;
import gs.easing.*;
var whoIsOn:Number = 0;
var clip:Array = ["orange","cranberry","melon","mango"];
this.attachMovie("btn","meenie", getNextHighestDepth(), {_x:150, _y:451});
this.attachMovie("btn","minie", getNextHighestDepth(), {_x:236, _y:451});
this.attachMovie("btn","moe", getNextHighestDepth(), {_x:322, _y:451});
this.attachMovie("orange","orange", getNextHighestDepth(), {_x:275, _y:411, _alpha:0});
this.attachMovie("cranberry","cranberry", getNextHighestDepth(), {_x:275, _y:411, _alpha:0});
this.attachMovie("melon","melon", getNextHighestDepth(), {_x:270, _y:420, _alpha:0});
meenie.onRelease = function() {
if (whoIsOn == 0) {
TweenLite.to(orange, 1, {_alpha:100});
} else {
TweenLite.to(clip[whoIsOn], 1, {_alpha:0});
TweenLite.to(orange, 1, {_alpha:100,delay:1});
}
};
meenie.onRollOver = function() {
this._alpha = 40;
};
meenie.onRollOut = function() {
this._alpha = 100;
};
minie.onRelease = function() {
if (whoIsOn == 0) {
TweenLite.to(cranberry, 1, {_alpha:100});
} else {
TweenLite.to(clip[whoIsOn], 1, {_alpha:0});
TweenLite.to(cranberry, 1, {_alpha:100,delay:1});
}
};
minie.onRollOver = function() {
this._alpha = 40;
};
minie.onRollOut = function() {
this._alpha = 100;
};
moe.onRelease = function() {
if (whoIsOn == 0) {
TweenLite.to(melon, 1, {_alpha:100});
} else {
TweenLite.to(clip[whoIsOn], 1, {_alpha:0});
TweenLite.to(melon, 1, {_alpha:100,delay:1});
}
};
moe.onRollOver = function() {
this._alpha = 40;
};
moe.onRollOut = function() {
this._alpha = 100;
};
Thanks / help appreciated