Copy link to clipboard
Copied
How can I make a button that moves every two seconds by itself in ActionScript2?
At the moment, I have to use the on(press) command, but what I really need is for the button to be able to move randomly by itself every two seconds. For example:
(insert the code here) {
bc1._x = random(250)
bc1._y = random(250)
}
Thanks!
You can use the setInterval function to have a function repeated for specific time intervals. Here is a link to a tutorial that explains how to use it...
Copy link to clipboard
Copied
You can use the setInterval function to have a function repeated for specific time intervals. Here is a link to a tutorial that explains how to use it...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now