very_simple_site

Function / Var Review

Vodpod videos no longer available.

stop();

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

TweenLite.from(content_mc, 2, { x:-500, ease: Strong.easeOut });

btn1.addEventListener(MouseEvent.CLICK, display(btn1.x,”one”));
btn2.addEventListener(MouseEvent.CLICK, display(btn2.x,”two”));
btn3.addEventListener(MouseEvent.CLICK, display(btn3.x,”thr”));
btn4.addEventListener(MouseEvent.CLICK, display(btn4.x,”fou”));
btn5.addEventListener(MouseEvent.CLICK, display(btn5.x,”fiv”));

function display(endX,frame):Function{
return function(evt:MouseEvent) {
TweenLite.from(content_mc, 2, { x:-500, ease: Strong.easeOut });
TweenLite.to(selector_mc, 1, { x: endX, ease: Elastic.easeOut });
content_mc.gotoAndStop(frame);
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s