# What am i doing wrong?

**URL:** <https://forum.kirupa.com/t/what-am-i-doing-wrong/312645>\
**Category:** Uncategorized\
**Created:** [August 9, 2010, 11:13pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong/312645 "2010-08-09T23:13:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raccoon](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Raccoon](https://forum.kirupa.com/u/Raccoon)\
**Post date:** [August 9, 2010, 11:13pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong/312645/1 "2010-08-09T23:13:31Z")

</div>

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

```php

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

Thank you
