|
#1
|
|||
|
|||
|
I'm working on a game where I want an object to move to a random place every couple of seconds. I don't know how to make the object move after being placed randomly for the first time. This is my current code:
onClipEvent(load){ this._x = random(600); this._y = random(450); } Is there a way for me to add a timer that tells it when to move or something? Any help would be appreciated. |
|
#2
|
|||||||||
|
|||||||||
|
Most people use the built in timer to do timed things.
I haven't ever really learned it, but I think you use Code:
startTimer(); Code:
getTimer(); And by default it's in milliseconds or something. (Don't quote me on this, I'm not great.)
__________________
02/21/2014 Take On Me - Literal Version ![]() Quote:
|
![]() |
| Tags |
| flash, game, movement, random |
| Thread Tools | |
| Display Modes | |
|
|
| Please support this website by checking out our sponsors! |