Here we take advantage of TimelineMax’s sequencing prowess to do a series of tweens on clips that are being used to reveal an image. We’ll talk a bit about the offset parameter when using append() as well as have a little yoyo fun.
Beautiful fall trees image provided by DJ GIRISH: www.nepalirapper.com
Easy Breezy AS3
import com.greensock.*;
import com.greensock.easing.*;
bars.cacheAsBitmap=true;
img.cacheAsBitmap=true;
img.mask=bars;
//create TimelineMax instance and set to repeat infinitely
var timeline:TimelineMax=new TimelineMax({repeat:-1,repeatDelay:1,yoyo:true});
//speed vars
var duration:Number=.5;
//loop through each bar in bars clip
for (var count:Number = 1; count <=10; count++) {
//create reference to each individual clip
var mc:MovieClip=bars["bar"+count];
timeline.append(TweenMax.from(mc, duration, {x:"64", alpha:0, ease:Cubic.easeOut}), -.4);
}
Download Flash CS3 File
Want more masking fun?
Check out my Grid and Tile Mask Transitions
Happy Thanksgiving!






