View Full Version : How to reposition XY coords of image?

05-12-2009, 06:31 AM
Hi everyone.

I've created some code for a concept javascript game using Image Map as a value range on an image as well as the random math function to calculate where the image appears on the 400px by 400px screen.

The problem is i don't believe i've seen a case where an image, relative, absolute (whatever) can be re-positioned using javascript.

is there a javascript function to generate the xy positions of an image and place this in HTML? :)

The altnerative could be to create a dozen hidden images and pop them up randomly with a math random function from 0 to 11 but that defeats the purpose.