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
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
question about scale
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
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed