It depends what kind of object you’re trying to manipulate. For example, you cannot change the height of a newText object. For everything else you should be able to change with myObject.height = 450
You may also want to look at your object.stageHeight. That may different than object.height depending on your config.lua settings.
Here is an example of a working height transition project:
-- main.lua
local box1Width = 100
local box1Height = 100
local text1 = display.newText("height test", 0, 40, "Courier", 20)
text1:setTextColor(255, 255, 255, 255)
text1.x = display.viewableContentWidth/2
local box1 = display.newRect(0, 0, box1Width, box1Height)
box1:setFillColor(0, 200, 200, 255)
box1.x = display.viewableContentWidth/2; box1.y = display.viewableContentHeight/2
function growBox( event )
local t = event.target
local phase = event.phase
if "ended" == phase then
-- transition.to( t, { time=1000, width=t.width\*2, height=t.height\*2 } )
transition.to( t, { time=1000, height=t.height\*2 } )
end
end
box1:addEventListener( "touch", growBox )
text1:addEventListener( "touch", growBox )
[code]
– config.lua
application =
{
content =
{
width = 320,
height = 480,
scale = “zoomEven”
},
}
[/code] [import]uid: 8194 topic_id: 1862 reply_id: 5674[/import]