I am new to Corona. I want to move an object and scale it at the same time. I am not getting any solution. Can you please help me?
Thanks in advance. [import]uid: 97897 topic_id: 19933 reply_id: 319933[/import]
I am new to Corona. I want to move an object and scale it at the same time. I am not getting any solution. Can you please help me?
Thanks in advance. [import]uid: 97897 topic_id: 19933 reply_id: 319933[/import]
transition.to( object, { time=1500, xScale = 0.5, yScale = 0.5, y=200, x = 100 } )
[import]uid: 77868 topic_id: 19933 reply_id: 77543[/import]
[lua]transition.to(objectName, {time = 500, x = 100, y = 100, xScale = 0.5, yScale = 0.5})
[import]uid: 93133 topic_id: 19933 reply_id: 77545[/import]
transition.to( object, { time =1000, x =100, y =100, xScale =2, yScale =2}) [import]uid: 7911 topic_id: 19933 reply_id: 77547[/import]
Thanks a lot. it really worked. so easy now it seems. [import]uid: 97897 topic_id: 19933 reply_id: 77549[/import]
Hi,
I am trying to move my background image along the x-axis smoothly. Changing the x value and using translate will result in unwanted jump(glitch) in the background image. I tried the following code using transition.to, but it doesn’t move the background object. Could you help me to fix it? Or do you have another solution for the problem? Even in the sample codes that come with corona have, like HourseAnimation, the background image does not move smoothly.
local function createBackground()
ground1 = display.newImage(“backim.png”)
ground1.speed = foreSpeed;
ground1.x = 0;
ground1.y = 120;
end
local function move(event)
local xOffset2 = ( ground1.speed * tDelta )
transition.to(ground1, {time=100, x = (ground1.x - xOffset2)})
end
local function main()
createBackground()
Runtime:addEventListener( “enterFrame”, move );
end
Thanks, [import]uid: 80320 topic_id: 19933 reply_id: 109825[/import]