I found a website, http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part-1/, that gave me a basic tutorial on how to create a Tower Defense game in action script 3.0 and the way that it said to put the creation of enemies in an array and the number you put would mean the enemy's level and sub arrays would be for different levels:
enemyArray = [//defining the array
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],//#s will just represent an enemy to be created
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],//another row means another level
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,2,2,2,2,0,0,0,0,3,3,3,3,3,3,3,50]
];
And my question was "is there a way to have it automatically generate levels so that it is like a survival without an end? if so how"
In the end I don't necessarily care if this array method is what is still used or not but your help is greatly appreciated.
note: if you follow the link to the tutorial I found many instances where the coding there was incorrect and caused fatal errors.