controlling animation timing
Hey all. I'm new to OOP and AS3 but I'm diving in head first. I have what is probably a simple question if anyone can help me out with a simple answer. I'm doing my company website. When a mouse event sends you to my services page I have 4 seperate blocks of text that fade in. So far I have the first 2 texts blocks fading in at the same time. I want to stagger the timing so the second block of text starts its fade in a fraction of a second later, and so on with the remaining text blocks. Below is the code I've used to fade them in at the same time. Is there an easy way to adjust this code to achieve the desired effect.
//services text fade in
var servicesText1Tween:Tween = new Tween(servicesText1, "y", Regular.easeOut, 148.9, 140.9, 1, true);
var servicesText1Fade:Tween = new Tween(servicesText1,"alpha",Regular.easeIn,0,1,2,t rue);
var servicesText2Tween:Tween = new Tween(servicesText2, "y", Regular.easeOut, 244.7, 236.7, 1, true);
var servicesText2Fade:Tween = new Tween(servicesText2,"alpha",Regular.easeIn,0,1,2,t rue);
Many many thanks.
controlling animation timing with Tweener class
Hey absolutezero342 thanks for the Tweener tip. I used it to add delays to in my code and it works great and is pretty easy to use so far. For anyone out there using MC Tween you should try the Tweener class instead. I have another issue I'm trying to solve. I'm trying to apply the Blur Filter effect to my target object that I am also tweening.
I've imported and initialized the class;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();
but I don't really know where to go from here to get it to work. I tried a few things but nothing has worked so far.
Here's my code
import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();
redDot.alpha = 0;
//red dot moves diagonally and down
Tweener.addTween(redDot, {x:100, y:100, alpha:1, time:2, transition:"easeInOutQuad"});
Tweener.addTween(redDot, {delay:4, x:175, y:200, time:3, transition:"easeInOutQuint"});
animation.alpha = 0;
//animation button fades up from blur
Tweener.addTween(animation, {x:118, y:200, delay:6, alpha:1, height:100, width:300, time:1, transition:"easeInOutQuint"});
Thanks again.