Hi, I'm creating a flash game using actionscript however I'm unsure of how to add more enemies over time. It's a simple dodge game where items fall from the score and you must navigate around too avoid the items, however over time, say every 10 seconds I want another object to appear. How can I do this? Thanks.
myInterval = setInterval(addEnnemy,10000); function addEnnemy (){ your function } If you meant that you wanted to add an extra one every 10 seconds, do something like: var i:Number = 1; myInterval = setInterval(addEnnemy,10000); function addEnnemy (){ //your function using i for the number of ennemies //add one to the variable i every time this function is called i++; }