# Make script work in As3

**URL:** <https://forum.kirupa.com/t/make-script-work-in-as3/327960>\
**Category:** flash\
**Created:** [April 9, 2012, 3:23am UTC](https://forum.kirupa.com/t/make-script-work-in-as3/327960 "2012-04-09T03:23:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FuglyBastard](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@FuglyBastard](https://forum.kirupa.com/u/FuglyBastard)\
**Post date:** [April 9, 2012, 3:23am UTC](https://forum.kirupa.com/t/make-script-work-in-as3/327960/1 "2012-04-09T03:23:06Z")

</div>

I have a script that makes a set of frames move back and forth by use of the mouse in As2  
I would like to use it in As3 but couldnt figure out how to modify it. Could someone please help me make this work in As3  
Thanks

stop();  
onMouseMove = function() {  
gotoAndStop(Math.floor(\_root.\_ymouse\*(\_root.\_totalframes)/(\_root.\_height)));  
updateAfterEvent();  
}
