# Thumbnail mouse control AS2 to AS3 code conversion?

**URL:** <https://forum.kirupa.com/t/thumbnail-mouse-control-as2-to-as3-code-conversion/290743>\
**Category:** Uncategorized\
**Created:** [June 19, 2009, 12:15am UTC](https://forum.kirupa.com/t/thumbnail-mouse-control-as2-to-as3-code-conversion/290743 "2009-06-19T00:15:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mung](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mung](https://forum.kirupa.com/u/mung)\
**Post date:** [June 19, 2009, 12:15am UTC](https://forum.kirupa.com/t/thumbnail-mouse-control-as2-to-as3-code-conversion/290743/1 "2009-06-19T00:15:27Z")

</div>

Hi there,  
ive come across a problem… again haha, basically i want an action to take place when my mouse is within a certain amount of pixels of the edge of the screen (or boundaries). I know the AS2 code, but need it in AS3.  
I realise that listeners are going to be needed, so if anyone is kind enough to help me out convert this code, i would really appreciate it 🙂

heres the as2 code:

\*\*root.onEnterFrame = function  
if(\_root.\_xmouse\<50){  
instanceName.prevFrame();  
}  
\*\*
