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 [import]uid: 4795 topic_id: 13597 reply_id: 313597[/import]

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 :slight_smile: [import]uid: 52491 topic_id: 13597 reply_id: 50169[/import]

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 :slight_smile: [import]uid: 4795 topic_id: 13597 reply_id: 50170[/import]

Glad to hear it :slight_smile: [import]uid: 52491 topic_id: 13597 reply_id: 50390[/import]