Monday, October 31, 2011

Swapping an image at runtime....possible without setUrl?

I have some animated sprites (which extend image) where the images are
loaded at runtime (so no ImageBundles), and I wondered whats the best
way to animate the images.

Precacheing the images and using "setUrl" does work. But I cant help
feeling it would be better to store the images in an array and somehow
"applyTo" or update one image to become another.

Anyone have a good method to do this?

I thought of using a simplePanel containing a image which could then
be swapped for another....but that adds unnesscery html and I can no
longer treat my animatedSprites just as images.

Is there anyway to just swap a images data for another? much like you
can with AbstractImagePrototypes....only with Image data loaded (once)
from a url at startup?

Hope I am clear enough.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment