Help playing a sprite on top of a moving display object.

I’m writing your basic space ship blows up enemies that are scrolling toward you and your ship moves side to side.

So as the objects come toward you and your weapons hit them, I remove them and play an explosion animation using sprites. This works well because the object that gets hit goes away.

I was adding in support for tougher enemies that need multiple hits to kill. I didn’t like that the weapons hit just disappeared so I decided to use a 2nd explosion animation (same explosion, just starting half way through so its smaller)

Since I no longer remove the large enemy, it keeps advancing (using eventFrame to move it) but the sprite animation stays where the hit took place. I’m not grossly offended by that, but I’m left with artifacts of the explosion still on the screen.

So should I try to keep a reference to the instance and move it in the game loop? Is there a way to remove these artifacts? Should I stop the enemy advance?

http://www.omnigeekmedia.com/images/tmp/Snapz001.png

[import]uid: 19626 topic_id: 8479 reply_id: 308479[/import]