Why this work:
local plane = display.newImageRect( "images/airplane.png", 70, 45 );
plane.x = 880 ;
plane.y = 60 ;
local animPlane;
animPlane = transition.to (plane, {
time = 4000,
x = -80,
});
and this not:
local plane = display.newImageRect( "images/airplane.png", 70, 45 );
plane.x = 880 ;
plane.y = 60 ;
function movePlane ()
plane.x = plane.x - 5
end
for loop = 0, 180 do
timer.performWithDelay(1000, movePlane)
end
the first code works,
i was hoping the second codes will also make the plane move from right to left,
but what happen was it showed the beginning position and after a while just jump to end position.
P.S:
sorry for the noob question
well I have to start somewhere
[import]uid: 31508 topic_id: 31696 reply_id: 331696[/import]