>> img = random(imagesToGrab)+1;
Yeah - first part of is probably that your use of random is... well...
incorrect.
Math.random() retruns a random number of 0.0 or between 0.0 and 1.0.
You should convert it to a whole number first.
function getRandom(min:Number, max:number){
return min+Math.floor(Math.random()*(max+1-min));
}
The other part is that you're overwriting the img variable:
img = random(imagesToGrab)+1;
img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;
So in effect, the first value of img is replaced in the second line.
Jason Merrill | E-Learning Solutions | icfconsulting.com
NOTICE:
This message is for the designated recipient only and may contain privileged or
confidential information. If you have received it in error, please notify the
sender immediately and delete the original. Any other use of this e-mail by you
is prohibited.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders