# Drag Drop Snap Array

**URL:** <https://forum.kirupa.com/t/drag-drop-snap-array/332438>\
**Category:** flash\
**Created:** [June 7, 2014, 11:44pm UTC](https://forum.kirupa.com/t/drag-drop-snap-array/332438 "2014-06-07T23:44:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Code\_Mafia](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Code\_Mafia](https://forum.kirupa.com/u/Code_Mafia)\
**Post date:** [June 7, 2014, 11:44pm UTC](https://forum.kirupa.com/t/drag-drop-snap-array/332438/1 "2014-06-07T23:44:38Z")

</div>

Hi, just joined, :yoda:  
So first of all, I am working on Flash CS6, AS2.

I am trying to make an inventory system where I can snap my item to abunch of slots, like slot1, slot2… slot20… so the only way I know how to do it would be to write if else after if else… after if else… to get this done, thats too much code I would be at 200 lines if I did this my way, anyone know how I can make my inventory system have some sort of array where the code lets you have upto slot anything with out having to write too much to add a new slot to the system or new item to the system, Heres my file if anyone wants to look at it and help me out, I wouldnt mind donating acouple bux from my paypal if you can help me out. THANKS KIRUPA LOVERS
