Controll playing sprite

Hi folks,

I must admit I am a total noob when it comes to sprites. Thankfully I am not doing anything to advance I hope. My first question if you can recommend any resources describing sprite basics. My second question is practical. I've made a sprite sheet with TexturePacker. It has 5 frames. What is the best way to animate the sheet from frame 1 to 5, then pause for a second and then animate backwards to 1 again?

Thank you all in advance

For the basics of sprites - and some slightly more intermediate stuff - take a look here; http://techority.com/2011/05/01/using-sprites-in-your-corona-iphone-application/

The downloadable project file has lots of comments explaining a bunch about sprites, including playing different sequences, pausing, etc.

You can also see here; http://developer.anscamobile.com/content/animation for information about playing a sprite in the reverse direction.

Peach :)

@peach pellen, so your suggestion is to use movieclips instead of sprites?

By the way, are you the same person who was active on GameSalad forums?

It really depends on what you want to do; I would encourage you to check out the Techority link first, have a play, then have a read up on the docs and consider the path that best "clicks" with you.

Personally, it would depend on how many frames you were looking at using and how large the sheet was. (I am guessing 5 frames from your first post - how large is that sheet and what device are you targeting?)

As to GameSalad - yes, I was a regular there until just over a year ago when they proposed "Direct", at which time I found Corona, fell in love with it and joined the Ansca team.

Are you ex GS?

Peach :)

I am trying to create an animation that plays until last frame then pause for a second or two and then plays it backwards. As I can see there is no way to do it directly. That's why I was interested in opinions about different ways to do it.

If I use sprites I could prepare one animation that plays frames forward and another that plays it backwards. Then to play first one, stop, play second one with a timer.

With moviclips I could create a clip play it until last frame, pause and then start again (with timer) playing it backwards.

Are there other possibilities? Which one is to prefer?

I started using GS and were on my way to subscribe, but then they took away the possibility to create a custom splash screen, which didn't make my client too happy. I went with Titanium and later found Corona SDK. So I am using this for my own projects. Good work making Ansca Stuff btw. Gz!

views:1525 update:2011/12/1 20:56:45
corona forums © 2003-2011