Hi how can i change the animation from “hammerRightStill” to “hammerRightHmmer” on a event ?
-- Hammer start local HammerRight = { width = 75, height = 54, numFrames = 10, sheetContentWidth = 750, sheetContentHeight = 54, } local hammerRightinfo = graphics.newImageSheet( "img/hammer.png", HammerRight ) local hammerRightStill = { name="normal3", frames= {1}, time = 600, loopCount = 0 } local hammerRightHmmer = { name="normal4", frames= {1,2,3,4,5,6,7,8,9,10}, time = 600, loopCount = 1 } local screenGroup = self.view hammerRight = display.newSprite( hammerRightinfo, hammerRightStill) shape = { -5,-15, 15,-15, 1, 16, -10,16, } hammerRight.x = display.contentWidth/2 + 16 hammerRight.y = display.contentHeight/2 hammerRight:play() hammerRight.collided = true hammerRight.name = "hammerRight" hammerRight:setReferencePoint( display.CenterLeftReferencePoint ) hammerRight.isVisible = true-- false hammerRight.isFixedRotation=true screenGroup:insert(hammerRight) -- Hammer stop