Moving sprites between display groups

Heya,

I’m pretty sure there’s a trivial answer to this, but I’m banging my head against a wall here.

The short of it is that I have a sprite within a display group, which is itself translated and within a group and I want to add it to a second group which is also translated and nested within other display groups. I want to move the sprite from one group to another without its screen position changing.

My attempts have looked like this

local cx,cy=sprite:localToContent(0,0)  
group:insert(sprite)  
sprite.x,sprite.y=group:contentToLocal(cx,cy)  

Yet I am having no luck! Could anyone tell me what I might be doing wrong?

thanks, [import]uid: 11757 topic_id: 23413 reply_id: 323413[/import]