Forum Discussion
Dynamic Sorting activity
Hi Vishakha. I've done something similar with 24 card-like objects sorted across three targets. I did not use a formal Drag and Drop question, but just the Drops the Object On triggers. Your planned approach seems more or less correct. You would want SL variables to track how many cards are in each drop stack, where each card was dropped (allowing for repositioning if desired). For slides 2 and beyond, you could use some JS to scan all the SL card position variables, and set five SL variables to indicate which of the 43 states each of the placeholders should be, then set them using triggers. One JS routine with a flag SL variable indicating each of the 5 possible outcomes would minimize code and extra SL variables/triggers. You probably don't need any arrays.
As for limiting each stack to 9 card drops, you might search for info on the 0px move trick for resetting dropped items to their starting point. Attach a move animation with length 0px to each of the 43 cards. If the drop count for any given stack exceeds 9, reject the card by triggering its 0px move animation and reset the count to 9.