Sprite animation: keep it on its position

Hi!
I have a sprite with non uniform images, so when I animate it, it expandes from its center, I want it to expand from left (or right),

You can see the spritesheet here:

http://imageshack.us/photo/my-images/202/navera.png/

How can I achieve it?

Thanks for you support!

@jordi,
there are two ways to manage that,

1. Use an app like Sprite Helper or Texture Packer to compress the textures and create an optimised spritesheet with custom sprites which can then be used in your app

2. Make the size of the sprites to the largest size and then position the sprites accordingly, probably the easiest way

cheers,

?:)

hey @jayantv,
I used texturepaker to create my sprites, using the crop and trim option so it uses an smaller image,

Anyway, if I do it like you say, the touch event will get launched when I touch the transparent pixels, in the first frame (the smallest image..) so it will make it a little weird tought.

Is there a way to setup that transparent pixels doesn't repspond to touch events?

Thanks so much!

You can take a look at SpriteHelper - it will also let you create physic shapes and animations. More info here: www.spritehelper.org

views:1560 update:2011/9/29 9:22:17
corona forums © 2003-2011