Hi elliotlp,
I took a look at the code, but I’m still not sure what’s the intended effect you’re looking for. I’m not seeing what you mean by the squiggle frame is offset. Is there anyway you can do a screen capture to explain the effect your looking for?
I edited and reposted your code sample below creating another sprite for comparison. Is that what you’re looking for?
Updated to include a screencast:
http://screencast.com/t/ZVcdLQaqnog
-- Require the module
local loqsprite = require('loq\_sprite')
-- Create a SpriteFactory and include some spritesheet modules
local spriteFactory = loqsprite.newFactory('Pirate')
-- Create a SpriteGroup instance and pass in an initial animation
local si = spriteFactory:newSpriteGroup('pirate')
-- Position the spriteGroup instance
si.x = 200
si.y = 300
si:play()
-- For atrace and xinspect
require('loq\_util')
-- Prints out the table of animations: standing, running, jumping
atrace(xinspect(si:getSpriteNames()))
-- Everything above works correctly. The pirate's feet don't move
-- Then I want to flip him to face the other direction, but
-- his feet get offset incorrectly...
si.xScale = -1
-- here I've created a new sprite with normal scaling, but added a touch handler to flip him.
local si2 = spriteFactory:newSpriteGroup('pirate')
si2.x = 200
si2.y = 200
si2:play()
local function onTouch(\_e)
if \_e.phase == 'began' then
si2.xScale = si2.xScale \* -1
end
end
Runtime:addEventListener('touch', onTouch)
Also, we just posted a series of tutorials to youtube that cover:
Flash export: http://www.youtube.com/watch?v=iOvI4el8Q1U
Spriteloq alignment and export: http://www.youtube.com/watch?v=Z7PYgq6cPXU
A sample application: http://www.youtube.com/watch?v=OqwU1pggpJY
I hope those help. If you need faster support you can reach me at support@loqheart.com
[import]uid: 27183 topic_id: 11389 reply_id: 41405[/import]