question about scale

I'm sure it's simple and I'm just over thinking it but if I have an object and I scale it by 1.5 how do I get back to the original size

If I am not mistaken (which is possible) scale is relative to the original size. So setting the scale to 1.0 should bring it back to the original size....

no scale is relative to the size at the time of scale would be nice if there were a param to set relative to original size

local specialButton = display.newImage("buttonBlue.png")
specialButton.x = 240
specialButton.y = 280
specialButton.xScale = 1.5
specialButton.yScale = 1.5
localGroup:insert(specialButton)

local function myFF()
specialButton.xScale = 1
specialButton.yScale = 1
end
timer.performWithDelay(2000,myFF)

thanks 123
I was using object:scale instead of .xScale forgot about that

do something like this

module(..., package.seeall)

function new()
local localGroup = display.newGroup()

local image = display.newImage("buttonBlue.png")
image:scale(3/2,3/2)
local function myff()
print("asd")
image:scale(2/3,2/3)
end
timer.performWithDelay(2000,myff)

return localGroup
end

views:1489 update:2011/10/3 8:06:12
corona forums © 2003-2011