Hi all, I have what seems to be a pretty simple request but I can’t for the life of me figure out a solution. I have a feeling it’s so simple and that I must be missing something.
What I have is this:
[LIST]
[]An array that contains 10 items.
[]I also have 10 movie clips on the stage (they are simple squares, each representing an empty item slot of the player’s inventory).
[*]I also have 10 different movie clips in the library (these are the items that will fit inside the empty inventory slots).
[/LIST]
What I need to do (I’m assuming) is to create a loop statement that does this for each item in the array:
[LIST=1]
[]Get the position of the item in the array (this is easy, just use a simple count).
[]Get the name of the item in the array (again, easy). Here’s where I’m struggling:
[*]Attach the movieClip of the same name (the “item” from the library) inside the appropriate movieClip on the stage based on the position of the item (the empty item slot).
[/LIST]
So for example, the first item in the array will be placed in slot “1” of the player’s inventory.
Thoughts? Is there a better way to do this?
Thanks so much to anyone who looks into this!