I have added in Composer the sprite tagged “bat” and inserted it inside the group “gameGroup” and works fine but I need to add a sprite sheet animation and doesn’t work for me. I think the reason is that I’m calling “bat = display.newSprite…” and this is creating a new sprite of course, so how can assign a sprite sheet and not create a new one?
Thanks!
gameGroup = self:getObjectByTag( "gameGroup" ) local bat = self:getObjectByTag( "bat" ) bird2SpriteSheet = graphics.newImageSheet( "birdRedAnimationSmall.png", { width=110, height=153, numFrames=16 } ) bat = display.newSprite( bird2SpriteSheet, { name="bat", start=1, count=5, time=400 } ) bat.x, bat.y = screenW\*0.5, 130 bat.xScale = 1.25 bat.yScale = 1.25 bat.anchorX = 0.5 bat.anchorY = 0.5 bat.alpha = .97 bat:play()