Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
What I want to do is build WALL of images, say of 2 random images.
X0X0X0X0X0 (where X and O are the images.)

Now to load these I normally would use a for loop such as (code isnt exact, but hope u get the idea)
C#
imageArray = "X", "O";
for (x = 0; x < numberOfImagesInWall; x++){
randomNum = random(2)
imageName = imageArray[randomNum];
loadimage (imageName)

.....etc....

}

When I use this method I find it loads the images EACH time for X and O. I am wondering if there is a way I can preload the image of X and O and just reuse them anytime I want, where no loading is involved.
Posted
Updated 28-Feb-13 5:30am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900