Sprite speed control

I originally built my game as 30 fps, but had cranked it up to 60 to get it running smoother. Now, I’ve got some sprites that are just a bit too fast. A lot of them are pretty large so I can’t double the images to make the loop last longer so would like to adjust the duration. That’s unfortunately not working out for me. No matter what I change it to, the sprites still play at the same speed.

I’m using this to bring the sprites into the level:

--ANIMATED BACKGROUND CHARACTERS  
  
 for key,data in pairs(leveldata.characters) do   
  
 spriteCharacter =sprite.newSpriteSheetFromData( data.src, require(data.page).getSpriteSheetData() )  
  
 local spriteSet = sprite.newSpriteSet(spriteCharacter,1,data.frames)  
  
 sprite.add(spriteSet,data.sprites,1,data.frames,1000,0)  
 spriteCharacter = sprite.newSprite(spriteSet)  
 spriteCharacter:play()  
 spriteCharacter.x = data.x  
 spriteCharacter.y = data.y  
 spriteCharacter.myName = data.myName  
 spriteCharacter.xScale, spriteCharacter.yScale = displayScale, displayScale  
 gameGroup:insert(spriteCharacter)  
  
 end  

And this is what they are pulling in:

leveldata.characters =   
 {   
  
 sprite01 =   
 {  
 id = "sprite01",  
 src = "bray"..suffix..".png",  
 page = "bray"..suffix,  
 sprites = "bray"..suffix,  
 frames = 29,  
 x = 360,  
 y = 170,  
 myName = "bray"   
 },  
  
 sprite02 =   
 {  
 id = "sprite02",  
 src = "spinbean"..suffix..".png",  
 page = "spinbean"..suffix,  
 sprites = "spinbean"..suffix,  
 frames = 120,  
 x = 360+540,  
 y = 168,  
 myName = "spinbean"   
 },  
 }  

Also, in there I’m using spriteCharacter.xScale, spriteCharacter.yScale = displayScale, displayScale to fit the @2x size versions for iPad, iPhone4 which is fine but they’re coming in double-size in the simulator for Android devices. Is there an alternative way I should do this to work on all platforms? [import]uid: 14032 topic_id: 8979 reply_id: 308979[/import]

Have you tried adjusting the time parameter in sprite.add()

http://developer.anscamobile.com/reference/sprite-sheets#sprite.add_spriteSet_startFlying_startFrame_frameCount_time_loopCount_

Because it’s defined in milliseconds the framerate of your game shouldn’t matter, but it’s worth looking at. [import]uid: 12108 topic_id: 8979 reply_id: 33142[/import]

I did. I moved it all the way up to 10,000 just to see if anything would happen and it made no difference. I think I may just go into the sprite sheet’s lua page and double up each call for the sprites… lotta work there though. [import]uid: 14032 topic_id: 8979 reply_id: 33146[/import]