Skewing a display object?

Hi,

Is there anyway to skew a display object in Corona? Like if you put your finger and press an object down, it will get shorter and a bit fatter, something like that.

Thanks.

Hi there,

I’m not exactly sure if that’s what you mean, but couldn’t you use xScale and yScale for that?

Just putting them in a touch event for the button.

local object = display.newRect(0,0,100,100) local function button\_press(event) local phase = event.phase if phase == "began" then object.xScale = 1.2 object.yScale = 0.8 elseif phase == "ended" then object.xScale = 1 object.yScale = 1 end end object:addEventListener("touch", button\_press)

Thanks, I think that will do it!

Darn, why didn’t I think of it!

Hi there,

I’m not exactly sure if that’s what you mean, but couldn’t you use xScale and yScale for that?

Just putting them in a touch event for the button.

local object = display.newRect(0,0,100,100) local function button\_press(event) local phase = event.phase if phase == "began" then object.xScale = 1.2 object.yScale = 0.8 elseif phase == "ended" then object.xScale = 1 object.yScale = 1 end end object:addEventListener("touch", button\_press)

Thanks, I think that will do it!

Darn, why didn’t I think of it!