I have a group of images. Each of these images has a text instance variable.
On load, I want to load a random image. Depending on the image selected at random, I want to load a series of images that are "tagged" with some attributes related to the one that was picked.
So, say on load, I pull an image with an instance variable "green".
I want to load all images that have that instance variable included also. So out of a larger pool of images, I want to pull out the 3 images that have "green" as an instance variable also.
1) How would I randomize the image generation on load?
2) How would I then take that instance variable value and draw only those images that have that variable applied?