Greetings everybody! This is my first post in this community, and unfortunately I need some help with this actionscript coding. Even if only 1 problem can be solved, I would definitely appreciate it
I have a movie clip that moves randomly around the screen. How would I make this movieclip duplicate once every 10 seconds (while user is still playing the game)? In addition to that, how would I impose a limit? For example, if the number of objects on the screen hits 20, it's game over.
I have this other movieclip that will be acting as a "bonus". After every 40 seconds, one of this movieclip should appear on the screen. How would I do this?
I would like to have a timer - a timer which counts from a number to nothing. When it hits "0", I am taken to the "Game over" frame. How would I do this?
Again, thanks for reading this post. Have a great day!
You can use the setInterval function to manage making things happen every so often. To duplicate the movieclip every 10 seconds, use setInetrval with duplicateMovieClip. To stop whatever at some many, keep a count of how many there are as you add them. Similar solution for the 40 second activity.
As far as counting down goes, you can use the getTimer function to establish a starting time, then continuously call it to see how much time has passed and subtract that from whatever coutndown time you want to allow for.
If you have questions about these functions, the Flash help doicumentation explains them all.
Thank you for your help - I'll have a look at the help documentation!
Thanks for the tips