local sheetData1 = { width=300, height=300, numFrames=8, sheetContentWidth= 2400, sheetContentHeight= 300 }--5700 --2900 } local sheet1 = graphics.newImageSheet( "player.png", sheetData1 ) local sequenceData = { { name="seq1", sheet=sheet1, start=1, count=4, time=800, loopCount=0 }, { name="walk", sheet=sheet1, start=5, count=8, time=800, loopCount=0 }, } local myAnimation = display.newSprite( sheet1, sequenceData ) myAnimation.x =display.contentWidth/2 ; myAnimation.y = display.contentHeight/2 myAnimation:play() myAnimation.xScale = 0.75 myAnimation.yScale = 0.75 local function tap(e) if e.phase == "ended" then myAnimation:setSequence( "walk" ) myAnimation:play() end end Runtime:addEventListener("touch",tap)
Why my sprite will stop a while when the sprite run to the last image and go back to the fifth image ?