I’m new to Corona but loving it so far.
I’ve gotten quite deep into it without having to post to the forums, but I’m running into something weird right now. When using sprite.timeScale, my animation doesn’t go any faster or slower, no matter what value.
Here’s the code I’m using:
[lua]-----
require(“sprite”);
local data = require(“dance”).getSpriteSheetData();
local sheet = sprite.newSpriteSheetFromData(“dance.png”, data);
local set = sprite.newSpriteSet(sheet, 1, 109);
local function spriteEvent(pEvent)
if pEvent.phase == “end” then
pEvent.sprite:removeEventListener(“sprite”, spriteEvent)
pEvent.sprite:removeSelf();
end
end
local function touchEvent(pEvent)
local instance = sprite.newSprite(set);
instance.timeScale = 20;
instance.x = pEvent.x;
instance.y = pEvent.y;
instance:play();
instance:addEventListener(“sprite”, spriteEvent);
end
-----[/lua]
Every time you touch the screen, the sprite is created; this all works fine. But there’s no difference in speed when I change the timescale. Did I forget something?
Any help would be awesome.
-E [import]uid: 71962 topic_id: 11780 reply_id: 311780[/import]