Click here to Skip to main content
Rate this: bad
good
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 4:15am
Edited 28-Feb-13 5:30am
496.3K
v2

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

  Print Answers RSS
0 OriginalGriff 364
1 Nirav Prabtani 268
2 _Amy 230
3 Sergey Alexandrovich Kryukov 171
4 CHill60 170
0 OriginalGriff 8,004
1 Sergey Alexandrovich Kryukov 7,017
2 Maciej Los 4,039
3 Peter Leow 3,738
4 CHill60 2,912


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2014
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