For my problem i will use this example.
I have a level select page ( for Android ).
Now, i am looking for the best way to do this.
Every level got it's own object / image ( level 1, level 2, level 3 etc. )
Now what i can do is creating 10 images for all 10 levels and put 10 objects on my layout.
Yet i think this is a waste of memory and objects.
Is it possible to use 1 object with all 10 images as animations?
What i had in mind that didn't work.
The object has animation frames: 0,1,2,3,4,5,6,7,8,9,10
The object has a instance variable named: animationID
I give every placed objects its animationID as: 0,1,2,3 etc.
Than on start of layout, set animation to: animationID
This actually doesn't work since i can't do the last step.
I know this is wrong but i need some idea to reach that goal.
Thanks in advance!