# as2 to as3 conversion

**URL:** <https://forum.kirupa.com/t/as2-to-as3-conversion/327150>\
**Category:** flash\
**Created:** [February 9, 2012, 6:13am UTC](https://forum.kirupa.com/t/as2-to-as3-conversion/327150 "2012-02-09T06:13:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raman\_arena](https://avatars.discourse-cdn.com/v4/letter/r/e68b1a/32.png) [@raman\_arena](https://forum.kirupa.com/u/raman_arena)\
**Post date:** [February 9, 2012, 6:13am UTC](https://forum.kirupa.com/t/as2-to-as3-conversion/327150/1 "2012-02-09T06:13:18Z")

</div>

how can i convert this code into as3.0

its applied on the movieclip with name of em1

onClipEvent (load)  
{  
nu = 1;  
}  
on (rollOver)  
{  
if (\_root.ln != nu)  
{  
this.gotoAndPlay(“s1”);  
} // end if  
}  
on (releaseOutside, rollOut)  
{  
if (\_root.ln != nu)  
{  
this.gotoAndPlay(“s2”);  
} // end if  
}  
on (release)  
{  
if (\_root.ln != nu && \_root.animation == 1)  
{  
\_root.animation = 0;  
\_parent[“em” + \_root.ln].gotoAndPlay(“s2”);  
\_root.ln = nu;  
\_parent.play();  
} // end if  
}
