Hello, I am working on a small website that has nine bars spanned horizontally, and when you roll over any one of them, it should get much smaller, and the ones next to it should also follow, gradually getting less and less, creating almost sort of a reverse wave look. Well I was able to figure this out, so everything works how it should so far.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var yPost1:Tween = new Tween(btn1Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost2:Tween = new Tween(btn2Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost3:Tween = new Tween(btn3Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost4:Tween = new Tween(btn4Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost5:Tween = new Tween(btn5Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost6:Tween = new Tween(btn6Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost7:Tween = new Tween(btn7Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost8:Tween = new Tween(btn8Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
var yPost9:Tween = new Tween(btn9Movie.btn1Mask, "_y", Regular.easeOut, 0, 0, .3, true);
btn1Movie.onRelease=function(){
yPost1.continueTo(270);
yPost2.continueTo(280);
yPost3.continueTo(280);
yPost4.continueTo(280);
yPost5.continueTo(280);
yPost6.continueTo(280);
yPost7.continueTo(280);
yPost8.continueTo(280);
yPost9.continueTo(280);
btnTextMovie.btnText.text=">> Button 1";
}
btn1Movie.onRollOver=function(){
yPost1.continueTo(270);
yPost2.continueTo(200);
yPost3.continueTo(120);
btnTextMovie.btnText.text=">> Button 1";
}
btn1Movie.onRollOut=function(){
yPost1.continueTo(0);
yPost2.continueTo(0);
yPost3.continueTo(0);
btnTextMovie.btnText.text="";
}
There is the code i’m using (has just one of the button’s code in it) Go easy on me, I’m new to AS.
First of all, is there any way to consolidate this? It’s getting pretty lengthy copying all of the onRoll events for each button.
Second, I need them to animated differently once one of the buttons has actually been clicked. You’ll see that they all shrink down from an onRelease event (to make room for the loaded .swf) but my problem is that when you move the mouse off them, it still plays the onRollOut event. How can I get it to not play that event? Thanks!
-Filmguy