# \[as2\] - Converting AS1 code to AS2.0?

**URL:** <https://forum.kirupa.com/t/as2-converting-as1-code-to-as2-0/210334>\
**Category:** flash\
**Created:** [December 17, 2006, 10:29pm UTC](https://forum.kirupa.com/t/as2-converting-as1-code-to-as2-0/210334 "2006-12-17T22:29:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oli\_G](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oli\_G](https://forum.kirupa.com/u/Oli_G)\
**Post date:** [December 17, 2006, 10:29pm UTC](https://forum.kirupa.com/t/as2-converting-as1-code-to-as2-0/210334/1 "2006-12-17T22:29:22Z")

</div>

Hi all,

I have the following code that’s working withing the context of a Flash8 file.

Suffice to say, this old code only works under AS1.0.

Could anyone give any pointers in making this 2.0 friendly?

Cheers

i = 2;  
while (Number(i)\<150) {  
duplicateMovieClip(“isk1”, “isk” add i, i);  
setProperty(“isk” add i, \_rotation, random(360));  
scalefactor = 40+Number(random(60));  
setProperty(“isk” add i, \_xscale, scalefactor);  
setProperty(“isk” add i, \_yscale, scalefactor);  
i = Number(i)+1;  
}
