# Having trouble with this simple script

**URL:** <https://forum.kirupa.com/t/having-trouble-with-this-simple-script/166805>\
**Category:** Uncategorized\
**Created:** [October 22, 2005, 11:16pm UTC](https://forum.kirupa.com/t/having-trouble-with-this-simple-script/166805 "2005-10-22T23:16:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bandsaw](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bandsaw](https://forum.kirupa.com/u/bandsaw)\
**Post date:** [October 22, 2005, 11:16pm UTC](https://forum.kirupa.com/t/having-trouble-with-this-simple-script/166805/1 "2005-10-22T23:16:31Z")

</div>

im pretty new to actionscript. Can someone turn this to a horizontal roll out. nothing seems to work for me.

onClipEvent (load)  
{  
roll = false;  
menu = false;  
open = false;  
this.\_visible = false;  
y\_start = this.\_y;  
y\_stop = 20;  
y\_max = y\_stop + this.\_height;  
}

onClipEvent (enterFrame)  
{

```
mouse_x = _parent._xmouse;
mouse_y = _parent._ymouse;
menu_left = this._x;
menu_right = this._x + this._width;
menu_top = 0;
menu_bottom = this._y + this._height;
if (menu_left &lt; mouse_x && mouse_x &lt; menu_right && menu_top &lt; mouse_y && mouse_y &lt; menu_bottom)
{
    menu = true;
}
else
{
    menu = false;
} // end if
if ((roll || open) && (!open || menu))
{
    this._visible = true;
    speed = (y_max - menu_bottom) * 0.500000;
    if (y_stop - 1 &lt; this._y)
    {
        this._y = y_stop;
        open = true;
        roll = false;
    }
    else
    {
        _y = _y + speed
    } // end if
} // end if
if (open && !menu)
{
    speed = (y_max - menu_bottom) * 0.700000 + 1;
    if (this._y &lt; y_start + 1)
    {
        _y = y_start
        open = false;
        this._visible = false;
    }
    else
    {
        _y = _y - speed
    } // end if
} // end if

```

}

thanks
