embossing a sprite on an image background

hello again!

I positioned a sprite on an image background. Problem is whenever i scroll the background, the sprite doesn’t move with it. Is there a way to fix a sprite on a certain area on the image and its movement will be with its background?

tnx :slight_smile:

If we’re talking MIDP 1.0, you’ll pretty much just have to move the sprite whenever you move the background. I.e., change the places where you draw their Images.

If we’re talking MIDP 2.0, you can either do that (e.g. method ‘move’ of classes Sprite and TiledLayer), or you can add both to a LayerManager and then either call its method setViewWindow and move the view window around, or just vary the ‘x’ and ‘y’ parameters when you call the ‘paint’ method.

hi david!

yup, i’m using midp 1.0. i’ll try ur suggestion.

tnx :wink: