Hello,
I wonder if there is a way to change sprite position to make it really dynamic? I mean all examples coming with SDK are ‘static’ sprites. Horse, cat and green dude are moving on the spot, but the background is moving. Is it possible to make it vice versa - static background, but ‘dynamic’ sprite?
let’s say I want to make a cat from jungle scene to move from one side of the scren to another one and stop:
startX = 100
endX = 300
local sheet1 = sprite.newSpriteSheet( “runningcat.png”, 512, 256 )
local spriteSet1 = sprite.newSpriteSet(sheet1, 1, 8)
sprite.add( spriteSet1, “cat”, 1, 8, 1000, 1 ) – play only once
local instance1 = sprite.newSprite( spriteSet1 )
instance1.x = startX
instance1:prepare(“cat”)
instance1:play()
I guess instance1.x should change during the frame playing but I can’t figure out how to make it it incremental during the play.
I tried playing with enterFrame and pushing some increment expressions to instance1:play() but it didn’t work.
is there a way to do it? [import]uid: 109065 topic_id: 18998 reply_id: 318998[/import]
[import]uid: 52491 topic_id: 18998 reply_id: 73177[/import]