How to change the Characters Image in a game without changing the Events & Listenrs

Hey Gamers, 

I have developed a game and I want to add a feature to let user change the character by using the stars collected while playing the game. 

My question is for changing the character image do I Need to change anything with EVENTS & LISTENERS for every new character  ? 

I depends on how you coded it. If you set the listeners or events to the object like
Obj:addEventListener(“touch” ,lis)
And then do display.remove
And display new image that object the event should still be there,

but some code would help

You should consider sprites instead of single images. You can add your event handlers to the sprite and have the sprite play a different frame when you want a different look.

Rob

Can I add Events & listeners to complete Sprite ? And then use one frame to display a character image throughout the game? 

I just wanted to change the character image when user selects from character store in my game

Yes. Sprites are display objects just like a .newImageRect() would behave, just with some extra features.  But if you just want to change them when they select a new character from the store, it might be more efficient to delete the display object that’s the current player and make a new player with the new graphic.

Rob

I depends on how you coded it. If you set the listeners or events to the object like
Obj:addEventListener(“touch” ,lis)
And then do display.remove
And display new image that object the event should still be there,

but some code would help

You should consider sprites instead of single images. You can add your event handlers to the sprite and have the sprite play a different frame when you want a different look.

Rob

Can I add Events & listeners to complete Sprite ? And then use one frame to display a character image throughout the game? 

I just wanted to change the character image when user selects from character store in my game

Yes. Sprites are display objects just like a .newImageRect() would behave, just with some extra features.  But if you just want to change them when they select a new character from the store, it might be more efficient to delete the display object that’s the current player and make a new player with the new graphic.

Rob