# AS2 to AS3 help

**URL:** https://forum.kirupa.com/t/as2-to-as3-help/324658
**Category:** flash
**Created:** [September 1, 2011, 7:45pm UTC](https://forum.kirupa.com/t/as2-to-as3-help/324658 "2011-09-01T19:45:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Eterya](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eterya](https://forum.kirupa.com/u/Eterya)
#### Post date: [September 1, 2011, 7:45pm UTC](https://forum.kirupa.com/t/as2-to-as3-help/324658/1 "2011-09-01T19:45:43Z")

</div>

Hello.

I have a script that I use for menues where a slider moves on mouse over.

Example is found here: [http://www.eterya.com](http://www.eterya.com)

This is a movie clip using as2. What I need is for this to work in as3.

Heres the code for the movie clip:

```auto
xpos = _xmouse;
 ypos = _ymouse;
}
onClipEvent (enterFrame) {
 _root.slider._x = (_root.xpos-_root.slider._x)/5;
 _root.slider._y = (_root.ypos-_root.slider_y)/5;
 xpos = _root.slider._x;
 ypos = _root.slider._x;
}

```

Heres the code attached to the buttons:

```auto
on (release, rollOver) {
 _root.xpos = 1578;
 _root.ypos = 0;
}
on (release) {
  getURL("html/hjem.htm","main");
} 

```

Can someone help me to convert this to as3?

Sincerely  
Ronny
