# Modulo help needed

**URL:** <https://forum.kirupa.com/t/modulo-help-needed/183482>\
**Category:** Uncategorized\
**Created:** [March 27, 2006, 2:03pm UTC](https://forum.kirupa.com/t/modulo-help-needed/183482 "2006-03-27T14:03:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pointer](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@pointer](https://forum.kirupa.com/u/pointer)\
**Post date:** [March 27, 2006, 2:03pm UTC](https://forum.kirupa.com/t/modulo-help-needed/183482/1 "2006-03-27T14:03:07Z")

</div>

Hello there,

I need to create two lists from myItem.length;  
But this length can be variable aswell.

How could i create this list with modulo?

Its something like.  
1 5  
2 6  
3 7  
4 8

thnx in advanced.

---

<div class="post-metadata">

**Author:** ![joene](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@joene](https://forum.kirupa.com/u/joene)\
**Post date:** [March 27, 2006, 3:08pm UTC](https://forum.kirupa.com/t/modulo-help-needed/183482/2 "2006-03-27T15:08:10Z")

</div>

[AS]  
mc.\_x = 20 + Math.floor(i / 5) \* 40;  
mc.\_y = 20 + (i % 5) \* 40;  
[/AS]  
I’ve attached an .fla, so you can see it in action 😉
