What do you mean by "spawn an object from this"? From what, from the array?
Also, you are adding each value into the array twice - one at the start of the array and one at the end.
Run your game in Debug Mode, select your array and you'll see.
yes you are correct! I checked and it did get added twice. For the next part... I have for example an animation with 20 frames and each of those frames are on my layout 1-20 what I want to do is when I for example double click on frame 2... that frame 2 image gets added to the Array, I double click on frame 5 and the frame 5 image gets added to the array and so on till I have added 10 of the 20 frames to the Array. Then I wanna be able to randomly create those 10 added frames onto the layout.
I didn't know if it would be better to do this way with image frames or just use 20 actual objects and not an animation. I'm sure if I do the animation way I will need a variable to reference each animation frame. I hope this makes sense so in short... I want to add whatever objects/animation frames I double click on, to the Array and then and then for example I click drop... those objects/animation frames are created randomly one by one on the layout till all 10 are gone from the Array.