How do I get my images to change when the player gains a point? (lost)

From ggc

Jump to: navigation, search

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.





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter