# Frustrating problem with tween class!

**URL:** <https://forum.kirupa.com/t/frustrating-problem-with-tween-class/226701>\
**Category:** flash\
**Created:** [May 23, 2007, 9:09am UTC](https://forum.kirupa.com/t/frustrating-problem-with-tween-class/226701 "2007-05-23T09:09:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomto](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@tomto](https://forum.kirupa.com/u/tomto)\
**Post date:** [May 23, 2007, 9:09am UTC](https://forum.kirupa.com/t/frustrating-problem-with-tween-class/226701/1 "2007-05-23T09:09:31Z")

</div>

Can anyone point me in the direction as to why this isn’t working?

```auto
changeWidth (quiz_holder, _width + 200, mx.transitions.easing.Strong.easeInOut);

function changeWidth(movName, moveTo, moveType){
    var time = 50;
    var sceney = movName._width;
    var endsceney = moveTo;
    new mx.transitions.Tween(movName, "_width", moveType, sceney, endsceney , time);
    changeWidth.onMotionFinished = function (){
        trace ("worked");
        changeHeight(quiz_holder, _height + 200, mx.transitions.easing.Strong.easeInOut);
    };
}

function changeHeight(movName, moveTo, moveType){
    var time = 50;
    var sceney = movName._height;
    var endsceney = moveTo;
    new mx.transitions.Tween(movName, "_height", moveType, sceney, endsceney , time);
}

```

What I want to happen is that the quiz\_holder box expands sideways, then when this is finished, it expands lengthways. At the moment it’s just getting to the point where it’s expanded sideways and then stops? Any ideas?

Thanks  
Tom
