Skip to content

Instantly share code, notes, and snippets.

@RKAN
Created July 21, 2013 06:58
Show Gist options
  • Save RKAN/6047764 to your computer and use it in GitHub Desktop.
Save RKAN/6047764 to your computer and use it in GitHub Desktop.
AS3 Fade Toggle
function fadeOff(b2:MovieClip):void {
Tweener.addTween( b2, { alpha: .1,time: .35, transition: "easeOutQuad", onComplete:clipOff, onCompleteParams:[b2]});
}
function clipOff(b3:MovieClip):void {
b3.visible=false;
}
function clipOn(c2:MovieClip):void {
Tweener.addTween( c2, { alpha: 1,time: .5, delay:.1, transition: "easeOutQuad"});
}
function fadeOn(c3:MovieClip):void {
c3.visible=true;
clipOn(c3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment