I am making a flash gallery. I have a dynamically generated
list of pictures which i use php for to look up the directory and
give me the files back in an array. I then loop through these files
and load them one by one, while i am looping i am also trying to
assign a function for each one so that when the user clicks on the
thumbnail image it will load up the associated big image in another
box. Unfortunately i cannot seem to get this to work, every time i
click on an image it will load up the current thumbnail that is
loading (assuming the loop is still in motion) rather than the
thumbnail i just clicked on. When all the thumbnails are finished
loading, none of the pictures will load anything when i click on
them. This might sound confusing but im trying to explain it the
best way i can.
**Here is the most relevant code, by the way, in this code i
am loading the associated thumbnail into the big image box, rather
than the associated big image, dont worry about that, im going to
change that later so that shouldn't be the problem.
each time one of your thumbs is clicked it's loading
currentThumb. and the value of currentThumb is the value at the
time the thumb is clicked, not when it's defined.
to remedy, assign a property to each currentImg, that allows
it to access the currentThumb when you define the onPress and then
use that property instead of currentThumb in your onPress' loadClip