# as3 Tween Help!

**URL:** <https://forum.kirupa.com/t/as3-tween-help/289172>\
**Category:** Uncategorized\
**Created:** [May 27, 2009, 6:48am UTC](https://forum.kirupa.com/t/as3-tween-help/289172 "2009-05-27T06:48:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![itzallme](https://avatars.discourse-cdn.com/v4/letter/i/c57346/32.png) [@itzallme](https://forum.kirupa.com/u/itzallme)\
**Post date:** [May 27, 2009, 6:48am UTC](https://forum.kirupa.com/t/as3-tween-help/289172/1 "2009-05-27T06:48:06Z")

</div>

Hello I’m trying to make a simple as3 menu using the drawing api, but i’m having a few problems.

First of all I want the red box on roll over to start out from where the gray box is, but right now its starting out from the left of the stage.

Second when I bring the mouse cursor off the stage the red box would just appear.

```auto
import flash.display.*;
import flash.text.TextField;
import fl.transitions.*;
import fl.transitions.easing.*;

var box:Sprite = new Sprite();
box.graphics.beginFill(0xCCCCCC);
box.graphics.drawRect(50,50,150,20);
box.graphics.endFill();
addChild(box);

var boxOver:Sprite = new Sprite();
boxOver.graphics.beginFill(0x990000);
boxOver.graphics.drawRect(50,50,150,20);
boxOver.graphics.endFill();
boxOver.scaleX = 0;
addChild(boxOver);

var menu:TextField = new TextField();
menu.text = "Menu Item Here";
menu.x=52;
menu.y=50;
addChild(menu);

menu.addEventListener(MouseEvent.ROLL_OVER, overHandler);
menu.addEventListener(MouseEvent.ROLL_OUT, outHandler);

function overHandler(e:MouseEvent):void
{
   var overTween:Tween = new Tween(boxOver, "scaleX", Strong.easeOut,boxOver.scaleX, 1,1, true);

}

function outHandler(e:MouseEvent):void
{
   var outTween:Tween = new Tween(boxOver, "scaleX", Strong.easeOut,boxOver.scaleX, 0,.5, true);

}

```
