Inverted Color Wipe Effect

by carl schooff on January 10, 2011 · View Comments

in GreenSock Tweening Platform Tips,Special Effects

Here is just a little overview of a cool effect that appears to use a mask. At the heart of this effect is simple Invert blend mode. We get a little loopy with an Array and TweenLite to make it super dynamic.

This movie requires Flash Player 9

Watch the Video

ActionScript 3.0 Code

import com.greensock.*;
import com.greensock.easing.*;

var navItems:Array = new Array("SUPERMAN", "TAZ", "STONE CRUSHER", "BLUE THUNDER", "BATMAN",  "ESCALADE");

var nav:MovieClip = new MovieClip();
nav.x=2;
nav.y=2;
addChild(nav);

//loop through the array and create a mess of navItems
for(var i:Number = 0; i< navItems.length; i++){

	var n:navItem= new navItem();

	n.cover.width=0;
	n.mouseChildren=false;
	n.buttonMode=true;
	n.y=i*62;
	n.label_txt.text = navItems[i]
	nav.addChild(n);
	}

nav.addEventListener(MouseEvent.MOUSE_OVER, navOver);
nav.addEventListener(MouseEvent.MOUSE_OUT, navOut);

function navOver(e:MouseEvent):void{
	TweenMax.to(e.target.cover, 1, {width:475, ease:Bounce.easeOut});
	}

function navOut(e:MouseEvent):void{
	TweenMax.to(e.target.cover, .5, {width:0});
	}	

This tutorial was inspired by the fine folks at www.designcharts.com

Download Source Flash CS3 Source Files

click to download snorkl-sample-invertWipe

Related Content

Official Greensock Tweening Platform : Getting Started
Learn about the for loop

Post to Twitter Post to Facebook

  • http://djgirish.com DJ Girish Khatiwada

    I like it. I may have to use this effect for my website.. Thanks.

  • http://www.snorkl.tv/ carl schooff

    great to see you around Girish. hope you are doing well.

  • http://djgirish.com DJ Girish Khatiwada

    Thanks Carl. I am doing well. Just got new DJ Decks so kinda busy trying to master that equipment/instrument. When i saw this effect first before watching your tutorial video, I had thought you did it with Masks too. But it was smart how u did it with invert blending mode. You should come by St. Louis to visit the Arch. I can show you the city.

  • http://www.snorkl.tv/ carl schooff

    Hey Girish, if I'm ever in St. Louis I will let you know. Thanks so much for

    the offer. I look forward to hearing more of your music.

    Carl

  • http://matthewlein.com Matthew Lein

    With this color scheme, i was expecting some Watchmen names up there

  • http://www.snorkl.tv/ carl schooff

    Hello. Monster Trucks are the best. The end.

    ;)

    Thx for dropping in. Great to have you.

    Carl

  • guest123

    can this be done for buttons o:?

  • http://www.snorkl.tv/ carl schooff

    not really well. you can add animation to a button by nesting a movieclip
    in there, but its a bit more work. movieclips give you the most flexibility
    and the smoothest effects

    http://www.snorkl.tv/2010/08/flash-movieclip-buttons-vs-simple-buttons-five-ways-to-build-a-button/

  • Zash

    how can I add an if statement that functions in such a way that when I click the 1st item in the array, it will act like a button?

    if navItem[0] is clicked it will go to frame 2

    can that be done?..

  • JP

    Hi Carl , great tutorial!.

    I have a question, Its possible to use gradient colors instead of only the white and black solid colors?

blog comments powered by Disqus

Previous post:

Next post: