is there a way to use spriteSheets instead of imageSheets in G2.0?

I have a project that uses a lot of sprites but all them were created using texture packer spritesheets (not imagesheets) in other words I was using sprite.newSpriteSheetFromData to create the spritesheet  but changing the project to use g2.0  I noticed newSpriteSheetFromData  does not exist anymore.  Do I need to convert all the files to image sheet? If i recall correctly imageSheet does not support rotation and trimming of the frames making the file size bigger.

thanks in advance for your help

In regards to the product “Texture Packer” from CodeAndWeb.com I notified codeandweb that newSpriteSheetFromData was going away and they updated TexturePacker a few months ago. Right now, using image sheets, I can rotate but I don’t know about trimming making the filesize bigger. I choose not to trim some of my 20 image sheets and haven’t seen a big difference (nothing noticeable).

The legacy sprite library can be found here:

https://github.com/coronalabs/framework-sprite-legacy

Rob

Thanks Rob I was using the sprite.lua file but it had a problem  on line 148 , that cause the sequence of the sprite just play one time when you set the loop count to any number other than 0 which makes it loop indefinitely. I fix ed it and it works fine now, so maybe it helps others here is what I did:

original sprite.lua code:

[lua]if loopParam and 0 ~= loopParam then

        loopCount = 1

        if -1 == loopParam then

            loopDirection = “bounce”

        elseif -2 == loopParam then

            loopCount = 0

            loopDirection = “bounce”

        end

    end [/lua]

fixed code:

[lua]if loopParam and 0 ~= loopParam then

        loopCount = math.abs(loopParam)

        if -2 == loopParam then

            loopCount = 0

            loopDirection = “bounce”

        elseif 0 > loopParam then           

            loopDirection = “bounce”

        end

    end[/lua]

In regards to the product “Texture Packer” from CodeAndWeb.com I notified codeandweb that newSpriteSheetFromData was going away and they updated TexturePacker a few months ago. Right now, using image sheets, I can rotate but I don’t know about trimming making the filesize bigger. I choose not to trim some of my 20 image sheets and haven’t seen a big difference (nothing noticeable).

The legacy sprite library can be found here:

https://github.com/coronalabs/framework-sprite-legacy

Rob

Thanks Rob I was using the sprite.lua file but it had a problem  on line 148 , that cause the sequence of the sprite just play one time when you set the loop count to any number other than 0 which makes it loop indefinitely. I fix ed it and it works fine now, so maybe it helps others here is what I did:

original sprite.lua code:

[lua]if loopParam and 0 ~= loopParam then

        loopCount = 1

        if -1 == loopParam then

            loopDirection = “bounce”

        elseif -2 == loopParam then

            loopCount = 0

            loopDirection = “bounce”

        end

    end [/lua]

fixed code:

[lua]if loopParam and 0 ~= loopParam then

        loopCount = math.abs(loopParam)

        if -2 == loopParam then

            loopCount = 0

            loopDirection = “bounce”

        elseif 0 > loopParam then           

            loopDirection = “bounce”

        end

    end[/lua]