Making images clickable

All your problems with Audio, Video and Images.

Making images clickable

Postby Klethron » Thu Feb 05, 2009 7:39 pm

It's been a while since I've worked in Java, so I'm pretty much relearning it. Here is what I am trying to accomplish. I have several images that are all .jpg's. They are the same size so what i want to do is have them swap out on the fly when people click on them. I don't need a button or anything, just when they click on the screen it will switch to another random image.

I am having a hard time understanding the dev documentation and was wondering if anyone could give me a brief overview of how to accomplish this I would be very grateful. Its all planned out in my head, but I am having trouble piecing it together. Thanks for your help in advance.

It goes like this:

Image 1 viewable, click
image 1 hidden, image 2 viewable, click
image 3 viewable, image 2 hidden ....................... so on and so forth.

Kevin
Klethron
Freshman
Freshman
 
Posts: 6
Joined: Thu Feb 05, 2009 5:21 pm

Top

Postby MrSnowflake » Fri Feb 06, 2009 9:48 am

Have the image changed on the click. That's much better for resources.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby hebbalhrk » Tue Feb 10, 2009 1:36 pm

Try using touch events for the images. Use a random image chooser on every touch event trigerred.
Hope this helps.
hebbalhrk
Developer
Developer
 
Posts: 37
Joined: Wed Jun 18, 2008 10:35 am

Postby MrSnowflake » Tue Feb 10, 2009 4:28 pm

hebbalhrk wrote:Try using touch events for the images. Use a random image chooser on every touch event trigerred.
Hope this helps.
Why would you do that? View has a clicklistener, so you could/should(?) use that for tapping only.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 23 guests