How do I get my images to change when the player gains a point? (lost)
From ggc
How do I get the images to change to the other image when two of the same images collide?
(Blue dot1 hits blue dot2.. Blue dot1 changes to red dot and blue dot2 moves to another random location.) I have my images in place of the dots but I can't get them to change when alike images collide. Please help.
You can call setImage to change the image. For example, if you have an ImageSprite called dot, you could do the following:
dot.setImage(Wiki.getMedia("one.jpg"));
and later do
dot.setImage(Wiki.getMedia("two.jpg"));
to change the image from one.jpg to two.jpg.
- This page was last modified on 21 January 2008, at 21:47.
- This page has been accessed 204 times.
- Privacy policy
- About ggc
- Disclaimers
- Powered by MediaWiki!









