Warning message when using sprite

I am new to corona,
I am experimenting with sprite right now.

I receive 2 warning with same message when I wrote the codes below:

spriteSheet = sprite.newSpriteSheet("images/wheelmenu.png", 80, 80);  
 spriteSet = sprite.newSpriteSet(spriteSheet, 1, 16);  
 sprite.add(spriteSet, "turn", 1, 16, 1000, 0);  
  
 local wheel = {};  
 wheelGroup = display.newGroup();  
 for loopY = 1, 12 do  
 wheel[loopY] = sprite.newSprite(spriteSet);  
 wheel[loopY].x = (loopY \* 80) - 200;  
 wheel[loopY].y = 120;  
 wheel[loopY]:prepare("turn");  
 wheel[loopY]:play();  
 wheelGroup:insert(wheel[loopY]);  
 end  

the warning is at line 3 and 8 and the message is:
Class Mismatch. Expected class of type: SpriteSheet got:SpriteSet

The codes above still run as what I expected, but I am curious why I got those warnings.

Thank you. [import]uid: 31508 topic_id: 32164 reply_id: 332164[/import]

I think you may be using the old API’s. Make sure they are the most recent ones…if not then I have no idea. [import]uid: 29181 topic_id: 32164 reply_id: 128055[/import]

I don’t understand what you mean by “old API”,
what I did was put this on my top line:

sprite = require ("sprite")  

do you mean I have to put some .lua file inside the project folder?
I am using the latest public release version build 2012.894 ( I am subscribed member).

thank you for the reply. [import]uid: 31508 topic_id: 32164 reply_id: 128057[/import]

The code you’re using is deprecated. Use the new sprite code - it’s much better and versatile.
Here is the API for the new sprite code–> http://docs.coronalabs.com/api/library/display/newSprite.html
[import]uid: 40033 topic_id: 32164 reply_id: 128066[/import]

@Pixin,

thank you for your information :slight_smile: I will read more on this topic. [import]uid: 31508 topic_id: 32164 reply_id: 128067[/import]

Hello @bpran,
Here’s a tutorial I wrote recently about the current sprite system… a step-by-step walk through.

http://www.coronalabs.com/blog/2012/10/02/animated-sprites-and-methods/

And here’s another tutorial about advanced sprite tips and tricks which you might find useful after you learn the basics:

http://www.coronalabs.com/blog/2012/10/09/dynamically-optimized-sprite-sheets/

Brent
[import]uid: 9747 topic_id: 32164 reply_id: 128071[/import]

@Brent
thank you very much :slight_smile:

[import]uid: 31508 topic_id: 32164 reply_id: 128092[/import]

@All,

Thanks for your help, it is greatly appreciated!

@bpran,
Let us know after using the new sprite API the warnings disappear. The context based autocomplete is best designed for use with the new sprite system.

Regards,
M.Y. Developers [import]uid: 55057 topic_id: 32164 reply_id: 128097[/import]

Thank you,
I will give it a try and keep you all posted :slight_smile: [import]uid: 31508 topic_id: 32164 reply_id: 128100[/import]

I think you may be using the old API’s. Make sure they are the most recent ones…if not then I have no idea. [import]uid: 29181 topic_id: 32164 reply_id: 128055[/import]

I don’t understand what you mean by “old API”,
what I did was put this on my top line:

sprite = require ("sprite")  

do you mean I have to put some .lua file inside the project folder?
I am using the latest public release version build 2012.894 ( I am subscribed member).

thank you for the reply. [import]uid: 31508 topic_id: 32164 reply_id: 128057[/import]

The code you’re using is deprecated. Use the new sprite code - it’s much better and versatile.
Here is the API for the new sprite code–> http://docs.coronalabs.com/api/library/display/newSprite.html
[import]uid: 40033 topic_id: 32164 reply_id: 128066[/import]

@Pixin,

thank you for your information :slight_smile: I will read more on this topic. [import]uid: 31508 topic_id: 32164 reply_id: 128067[/import]

Hello @bpran,
Here’s a tutorial I wrote recently about the current sprite system… a step-by-step walk through.

http://www.coronalabs.com/blog/2012/10/02/animated-sprites-and-methods/

And here’s another tutorial about advanced sprite tips and tricks which you might find useful after you learn the basics:

http://www.coronalabs.com/blog/2012/10/09/dynamically-optimized-sprite-sheets/

Brent
[import]uid: 9747 topic_id: 32164 reply_id: 128071[/import]

@Brent
thank you very much :slight_smile:

[import]uid: 31508 topic_id: 32164 reply_id: 128092[/import]

@All,

Thanks for your help, it is greatly appreciated!

@bpran,
Let us know after using the new sprite API the warnings disappear. The context based autocomplete is best designed for use with the new sprite system.

Regards,
M.Y. Developers [import]uid: 55057 topic_id: 32164 reply_id: 128097[/import]

Thank you,
I will give it a try and keep you all posted :slight_smile: [import]uid: 31508 topic_id: 32164 reply_id: 128100[/import]