Jump to content
Search Community

What am i doing wrong?

raccoon test
Moderator Tag

Recommended Posts

Hello i made a simple menu with TimelineMMax, but is not working fine, this is the code:

 

stop();

import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;

var timeline:TimelineMax= new TimelineMax({paused:true});
var timeline2:TimelineMax= new TimelineMax({paused:true});

timeline.append(TweenMax.to(container, 3, {x:0, y:-1000, rotation:0, scaleX:1, scaleY:1}));
timeline.append(TweenMax.to((container.nos.fondo), 5, {alpha:.6}));

timeline2.append(TweenMax.to(container, 3, {x:1550, y:-1000, rotation:90, scaleX:1, scaleY:1}));
timeline2.append(TweenMax.to((container.des.fondo), 5, {alpha:.6}));

nos.addEventListener(MouseEvent.CLICK, go);

function go(e:MouseEvent):void {
timeline2.reverse();
timeline.play();
}

des.addEventListener(MouseEvent.CLICK, go2);

function go2(e:MouseEvent):void {
timeline.reverse();
timeline2.play();
} 

 

sample into the file

 

Thanks...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...