Fps dont work

I’m trying to increase the speed of animation by changing the parameter

“time”. First was to 8 fps in one second (1000 ms).

sprite.add (spriteSet1, “Road”, 1, 8, 1000, 0)

Then I took him to 8 fps in half a second (500 ms). So 16 fps.

sprite.add (spriteSet1, “Road”, 1, 8, 500, 0)

No noticeable difference. Would be encouraged at twice the speed. Which is what I’m doing wrong?

sprite.add() is depreciated and doesn’t appear to be supported any longer. You should utilize display.newSprite().

http://docs.coronalabs.com/api/library/display/newSprite.html

Thanks for the suggestion. I was testing with this. but there must be a mistake, as it is stuck on the first frame.

local sheetData1 = { width=235, height=295, numFrames=4, sheetContentWidth=470, sheetContentHeight=590}

local sheet1 = graphics.newImageSheet( “Ani.png”, sheetData1 )

local sequenceData =

{

    name=“numeros”,

   

    start=1,

    count=4,

    time=1000,        

    loopCount = 0,    

    loopDirection = “forward”    

}

local character = display.newSprite( sheet1, sequenceData )

character.x=600

character.y=300

If the above code is your complete test, It doesn’t look like you implemented the setSequence portion.

http://docs.coronalabs.com/api/type/SpriteObject/setSequence.html

Finally, thanks for your help. Works!

Before using spriteListener function (event) to handle events in different frames. I see now that does not work. How do I replace spriteListener function (event)?

http://www.coronalabs.com/blog/2012/10/02/animated-sprites-and-methods/

With object.frame get, animation time, the frame number.

This is a running commentary on my own. Is it wrong orderly documentation of the API. Sometimes it costs too much to find an answer. If not for the people of the forums, programming uphill again. Thank you very much for your time. They have been very helpful your notes.

Thank,piotrz55

sprite.add() is depreciated and doesn’t appear to be supported any longer. You should utilize display.newSprite().

http://docs.coronalabs.com/api/library/display/newSprite.html

Thanks for the suggestion. I was testing with this. but there must be a mistake, as it is stuck on the first frame.

local sheetData1 = { width=235, height=295, numFrames=4, sheetContentWidth=470, sheetContentHeight=590}

local sheet1 = graphics.newImageSheet( “Ani.png”, sheetData1 )

local sequenceData =

{

    name=“numeros”,

   

    start=1,

    count=4,

    time=1000,        

    loopCount = 0,    

    loopDirection = “forward”    

}

local character = display.newSprite( sheet1, sequenceData )

character.x=600

character.y=300

If the above code is your complete test, It doesn’t look like you implemented the setSequence portion.

http://docs.coronalabs.com/api/type/SpriteObject/setSequence.html

Finally, thanks for your help. Works!

Before using spriteListener function (event) to handle events in different frames. I see now that does not work. How do I replace spriteListener function (event)?

http://www.coronalabs.com/blog/2012/10/02/animated-sprites-and-methods/

With object.frame get, animation time, the frame number.

This is a running commentary on my own. Is it wrong orderly documentation of the API. Sometimes it costs too much to find an answer. If not for the people of the forums, programming uphill again. Thank you very much for your time. They have been very helpful your notes.

Thank,piotrz55