How to use dynamic scaling with old SpriteSheet animation

Hi wow can i make old SpriteSheet animation work with dynamic scaling (if its possible)? 

 local screenGroup = self.view     helicopterSpriteSheet = sprite.newSpriteSheet("helicopters.png", 97, 55)      helicopterSprites = sprite.newSpriteSet(helicopterSpriteSheet, 1, 8)     sprite.add(helicopterSprites, "helicopters", 1, 8, 600, 0)     shape3 = {   39.5, 9.5  ,                    31.5, 17.5  ,                    3.5, 17.5  ,                   -4.5, 1  ,                    3.5, -17.5  ,                    21.5, -16.5  ,                    30.5, -11.5  ,                    39.5, 0.5  }      helicopter = sprite.newSprite(helicopterSprites)     helicopter.x = -80     helicopter.y = 350     helicopter:prepare("helicopters")     helicopter:play()     helicopter.collided = false     helicopter.name = "helicopterplayer"     physics.addBody(helicopter, "dynamic",      {density=.1, bounce=0.1, friction=.2, shape = shape3 ,filter=playerCollisionFilter }      )           helicopter.gravityScale = 0.0      helicopterIntro = transition.to(helicopter,{time=2000, x=150, onComplete=helicopterReady})     screenGroup:insert(helicopter)

Thanks

Is there a reason you want to use the old sprite library?  The new one handles dynamic sizing for you.

because i use  graphicsCompatibility = 1, or i’m i supposed to use SpriteObject or display.newSprite() ? 

oky look like i can use :

local options = {     width = 96.25,     height = 55,     numFrames = 8,     sheetContentWidth = 388,  -- width of original 1x size of entire sheet     sheetContentHeight = 110  -- height of original 1x size of entire sheet } local imageSheet = graphics.newImageSheet( "helicopters.png", options ) local sequenceData = {     name="normal",     frames= {1,2, 3, 4, 5, 6, 7, 8 }, -- frame indexes of animation, in image sheet     time = 50,           -- Optional, in milliseconds ; if not supplied, the animation is frame-based     loopCount = 0        -- Optional ; default is 0 } local character = display.newSprite( imageSheet, sequenceData )

Technically speaking, the old sprite library has nothing to do with Graphics compatibility for Graphics 2.0.  We just chose to remove the library at the same time.   We’ve had the new sprite library there for well over a year now and everyone should be using it.

But we have a lot of 3rd party libraries and older tutorials and such that use the legacy sprite library.    If your app doesn’t use legacy sprites, there is no need to use it just because you want to use graphicsCompatibility = 1.   All that setting does is make positioning of things behave as it did before we switched engines.

Rob

Is there a reason you want to use the old sprite library?  The new one handles dynamic sizing for you.

because i use  graphicsCompatibility = 1, or i’m i supposed to use SpriteObject or display.newSprite() ? 

oky look like i can use :

local options = {     width = 96.25,     height = 55,     numFrames = 8,     sheetContentWidth = 388,  -- width of original 1x size of entire sheet     sheetContentHeight = 110  -- height of original 1x size of entire sheet } local imageSheet = graphics.newImageSheet( "helicopters.png", options ) local sequenceData = {     name="normal",     frames= {1,2, 3, 4, 5, 6, 7, 8 }, -- frame indexes of animation, in image sheet     time = 50,           -- Optional, in milliseconds ; if not supplied, the animation is frame-based     loopCount = 0        -- Optional ; default is 0 } local character = display.newSprite( imageSheet, sequenceData )

Technically speaking, the old sprite library has nothing to do with Graphics compatibility for Graphics 2.0.  We just chose to remove the library at the same time.   We’ve had the new sprite library there for well over a year now and everyone should be using it.

But we have a lot of 3rd party libraries and older tutorials and such that use the legacy sprite library.    If your app doesn’t use legacy sprites, there is no need to use it just because you want to use graphicsCompatibility = 1.   All that setting does is make positioning of things behave as it did before we switched engines.

Rob