# AS2 Looping code translated to as3

**URL:** https://forum.kirupa.com/t/as2-looping-code-translated-to-as3/285407
**Category:** flash
**Created:** [March 31, 2009, 1:13pm UTC](https://forum.kirupa.com/t/as2-looping-code-translated-to-as3/285407 "2009-03-31T13:13:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeros10](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jeros10](https://forum.kirupa.com/u/jeros10)
#### Post date: [March 31, 2009, 1:13pm UTC](https://forum.kirupa.com/t/as2-looping-code-translated-to-as3/285407/1 "2009-03-31T13:13:53Z")

</div>

if (!thisloop) {  
thisloop = 1;  
}

if (thisloop == 3) {  
stop();  
}

if (thisloop \< 3) {  
thisloop++;  
} else {  
stop();  
}

For some reason i’m having a tough time translating this code to as3, i feel like it should be pretty simple!
