# Horizontal and vertical action tween

**URL:** <https://forum.kirupa.com/t/horizontal-and-vertical-action-tween/251104>\
**Category:** flash\
**Created:** [February 5, 2008, 1:01pm UTC](https://forum.kirupa.com/t/horizontal-and-vertical-action-tween/251104 "2008-02-05T13:01:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goeiste](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/goeiste/32/2741_2.png) [@goeiste](https://forum.kirupa.com/u/goeiste)\
**Post date:** [February 5, 2008, 1:01pm UTC](https://forum.kirupa.com/t/horizontal-and-vertical-action-tween/251104/1 "2008-02-05T13:01:40Z")

</div>

Hello all,

I have a problem with which I’m struggeling. I tried dearching for the solution, but the search was unlucky. My problem is that I want to build my stie like a cross (with only the centered page visible) and then, through a mouseclick, let the page move to the center position. To do this I want to incomrporate a horizontal and vertical action tween. However if I do this with the code below, it only tweens the y tween. How can I get flash to execute both tweens?

```auto

menu_1.onRelease = function (){
 
 function tween() { var xPosT:Tween = new Tween(object, "_x", Strong.easeOut, object._x, 0, 1, true)};
 function tween() { var yPosT:Tween = new Tween(object, "_y", Strong.easeOut, object._y, 0, 1, true)};
 
}

```
