Click here to Skip to main content
12,698,204 members (22,602 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Flash
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)
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 28-Feb-13 5:15am
Updated 28-Feb-13 6:30am
v2

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100