Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

[Resolved] New new newSprite :)
Started by gtatarkin Jul 28 2012 07:52 AM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

Hi,
did you try to deal with Texturepacker and sprite.newSpriteSheetFromData?

local sheet ={    frames =    {        {             textureRect = { x = 2, y = 70, width = 50, height = 50 },             spriteTrimmed = true,            spriteColorRect = { x = 38, y = 38 },             spriteSourceSize = { width = 128, height = 128 }        },        {            textureRect = { x = 2, y = 242, width = 50, height = 52 },              spriteTrimmed = true,            spriteColorRect = { x = 38, y = 36 },              spriteSourceSize = { width = 128, height = 128 }        },    }}


http://docs.coronalabs.com/api/library/sprite/newSpriteSheetFromData.html

I did and get quite strange behavior of sprites on scene... When I try to use "older" sprite engine:

local sheetInfo = require(spritePathData.."test")			local myImageSheet = graphics.newImageSheet(spritePathImg.."test.png", sheetInfo.getSheet() )						local sequenceData = {				name="rotate",				start=1,				count=36,				time=3000,			}						local testTest = display.newSprite( screenGroup, myImageSheet, sequenceData )			testTest:setReferencePoint( display.CenterReferencePoint )			testTest.x, testTest.y = middleX, middleY

all what I get is static screen. It's load spriteSheet, I can change sprite frame by changing start param in sequenceData but can't get animate sprite. Should I build function to change sequenceData.start to get it work? It's quite stupid way to do it...

I really need some tool to deal with sprite on last stable Corona build. My last project for client require 200+ imageSheets with about 36 frames each (kind of 3D products presentation).

uid: 12704 topic_id: 29177 reply_id: 329177


[TOPIC: post.html]
#2

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

Ok, SOLVED. Just builded my own solution to resolve this problem.
uid: 12704 topic_id: 29177 reply_id: 117370



[topic_controls]
[/topic_controls]