change object image (or sprite)

hi ..

i use svg parser to create my objects in inkscape and than i get
an object like

local object1 = levelBodies.bodies["path2827"]

i would need to change the image from that object at a specific point.
as i was reading that its not so easy, i would like to ask is there a way
to make that object a sprite and than say when i need "show sprite part 2"

i can't believe its so hard to change the image from an object.
I tried with remove and add new image. but always i jump into another problem

+1 feature: to change image easy from an object

and any help is appreciated to get it done

chris

I don't use svg parser or inkscape but you can easily change an image if you're using a spritesheet. Just set what is playing depending on the conditions. (It doesn't have to "play" as such, it can be a single frame.)

I've got a tutorial on Techority
about it - it could be what you're after.

(It's a sprite walking up, down, left and right with different images for each.)

Peach :)

Thanks I did it now with

local circle = movieclip.newAnim({ "graphics/chippy.png", "graphics/chippy_sling.png" })
circle:play()
circle:stopAtFrame(1)

now i can change the image just with circle:stopaAtFrame(x)
where x is the image I like to see.

most easy way :)

Glad to hear it :)

views:1588 update:2011/10/11 15:24:38
corona forums © 2003-2011