I dont know if the rest of your concept is sound, but I think the syntax is off for the part you have shown. try:
package {
public class Level1 extends Main {
public var floor1:Array = new Array( [2,1,1,1,1,1,2],
[1,1,1,1,1,1,1],
[1,1,1,2,1,1,1],
[1,1,1,1,1,1,1],
[1,1,1,2,1,1,1],
[1,1,1,1,1,1,1],
[2,1,1,1,1,1,2]
);
public function Level1() {
Main.levelArray = floor1;
}
}
}
EDIT: if the only thing distinct about each level is the array that forms the floor, you may consider the fact that you do not need a new class for each level, just a new array. you can define the arrays for each level in the class that is super
to this one and then just replace them with each progression.