# Why doesn't this work?

**URL:** <https://forum.kirupa.com/t/why-doesnt-this-work/236950>\
**Category:** Uncategorized\
**Created:** [August 25, 2007, 1:49pm UTC](https://forum.kirupa.com/t/why-doesnt-this-work/236950 "2007-08-25T13:49:37Z")\
**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:** [August 25, 2007, 1:49pm UTC](https://forum.kirupa.com/t/why-doesnt-this-work/236950/1 "2007-08-25T13:49:37Z")

</div>

Hiya

Ok i’m just creating my new portfolio website and something’s completely baffling me.

When I open a new section i’ve got a drop down that pops down and a mask reveals some text, then when the closeBtn is pressed I want the mask to reverse and the box that’s popped down to reverse. Here’s the code:

```auto
import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.display.*;

function moveShizzle(targetFrame)
{
    dropTxt.masker.onEnterFrame = function ()
    {
        if (this._currentframe != targetFrame)
        {
            this.prevFrame();
        }
        else
        {
            delete this.onEnterFrame;
        } // end else if
    };
} // End of the function

var dropDown = new mx.transitions.Tween(dropDown, "_height", mx.transitions.easing.Strong.easeInOut, 1, 270, 50);
    dropDown.onMotionFinished = function (){
        dropTxt.masker.play();
}

dropTxt.closeBtn.onRelease = function (){
moveShizzle (1);
new mx.transitions.Tween(dropDown, "_height", mx.transitions.easing.Strong.easeInOut, 270, 1, 50);

```

All that happens is the mask reverses, covering up the text, but the box behind it stays exactly where it is?

Any help much appreciated!

Tom
