Page 1 of 1

How to change speed of moving object?

Posted: Tue Jan 29, 2013 5:33 pm
by ahmedinvent24BUSGdU9
How to change speed of moving object while its moving?

Re: How to change speed of moving object?

Posted: Tue Jan 29, 2013 6:15 pm
by jmburnod
Hi Ahmed,

You can do that by different ways

You can define the during of the move like that:

Code: Select all

move NyControl  to tLoc in 2 seconds
or set the moveSpeed property:

Code: Select all

set the moveSpeed to 300 --  (pixelsPerSecond, 200 by default)
or building a list of points between the startloc and endloc and move the control in a loop

Best regards
Jean-Marc

Re: How to change speed of moving object?

Posted: Tue Jan 29, 2013 6:45 pm
by ahmedinvent24BUSGdU9
Thanks Jean-Marc
these code works :)
Thank You

Regards
Ahmed F.