-
Nice, I have to go soon but I've been toying with it some, figured out a way to make the bonus appear in different places for the three levels. by inserting
Code:
this.levels=[
{type:"Game",number:1, bonusx:200},
and then later on putting:
Code:
this.game.bonus._x=level.bonusx;
so this.levels is or is NOT one of the objects we have been talking about above? You called it an array in comments and it looks different than the code above but seems to be able to work in the same way as an object if I'm not mistaken. Anyways thanks a lot... going to have a lot of fun fooling around with this. I can very quickly see how this would be of great use to me.
ChaseNYC
-
level's isn't of type Object, it's an array. But each element in the array is an Object.
So levels[0] is an Object, levels[1] is an object, etc.
Basically, stuff between [ and ] makes an array. Stuff between [ and ] with name:value pairs makes an Object.
Code:
var someArray:Array=[ // an array containing
{x:1,y:10}, // an Object
{x:10,y:5} // and another Object
];