Skip to content

Instantly share code, notes, and snippets.

@40
Created September 18, 2012 04:40
Show Gist options
  • Select an option

  • Save 40/3741294 to your computer and use it in GitHub Desktop.

Select an option

Save 40/3741294 to your computer and use it in GitHub Desktop.
as3 blinds effect
unction vBlinds() {
var i=0;
var tweens:Array=new Array(16);
var shapes:Array=new Array(16);
var timer:Timer=new Timer(200,16);
timer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent){
shapes[i]=new Sprite();
shapes[i].name=i;
transitions.addChild(shapes[i]);
shapes[i].graphics.lineStyle(0,0x000000);
shapes[i].graphics.beginFill(0x000000);
shapes[i].graphics.drawRect(0, 0, 1, 900);
shapes[i].graphics.endFill();
shapes[i].y=0;
shapes[i].x=(i*100);
runTween(tweens, 16, shapes[i], "width", Strong.easeOut, 0, 100, 2, true);
i++;
}
);
timer.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment