Got a weird problem – I have a sprite animation that is skipping frames, or stuttering somehow. I threw in some code to track what was going on…
sequenceData = {{ name="swim", start=sheetInfo:getFrameIndex("mermaid01"), count=9, time=550 }, { name="idle", start=sheetInfo:getFrameIndex("mermaid01"), count=9, time=1100 }} player = display.newSprite( foregroundLayer, myImageSheet, sequenceData ) local function spriteListener(event) if event.phase == "loop" or event.phase == "next" then print("Player ", event.phase, player.frame) end end player:addEventListener ( "sprite", spriteListener )
…and what I’m getting is something like below. Notice that the first seven times every frame is being played, but after that it goes off into the weeds.
Has anybody seen anything like this before? (Using build 2016.2916)
Jay
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 2 ??? missing loop
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 9
Player loop 1 <–
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 2 ??? just a mess from here until I stopped it
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 2
Player next 3
Player next 4
Player next 2
Player next 3
Player next 2
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 2
Player next 3
Player next 4
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 2
Player next 3
Player next 2
Player next 3
Player next 4
Player next 2
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 7
Player next 8
Player next 2
Player next 3
Player next 2
Player next 3
Player next 4
Player next 5
Player next 6
Player next 2
Player next 3
Player next 2
Player next 3