Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite.image #36

Closed
davidgomes opened this issue Jan 29, 2012 · 3 comments
Closed

Sprite.image #36

davidgomes opened this issue Jan 29, 2012 · 3 comments

Comments

@davidgomes
Copy link

Changing the image of my sprite via:

my_sprite.image = "hello.png";

sprite.image is not working, I get "TypeError" on jaws.js.

my_sprite.setImage ("hello.png");

However, doing sprite.setImage ("new_image.png") is working.

@ippa
Copy link
Owner

ippa commented Jan 29, 2012

browser/os?

@davidgomes
Copy link
Author

Chromium 18/GNU Linux (Kernel version = 3.0.0-14)

@ippa
Copy link
Owner

ippa commented Jan 29, 2012

setImage() will load an un-specified asset on the fly.. the simple sprite.image is a raw setter of image data.. so use setImage() and only image= if you need some extra boost. I don't think it's much of a difference though, I might just deprecate sprite.image= in total.

@ippa ippa closed this as completed Jan 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants