Hello what i am trying to do is just to draw few images .so at first i made a group(i think this function is a part of a plugin i am using but thats no matter) then i made an array to store a name and src of several images and then i am calling a for loop to draw those images but the thing is i got no results at all no errors nothing so i try to alert "b.name" and "b.src" but result i got is undefined could someone explain me where is a problem cuz for me its seems everything good
var mapGroup = new Group();
var mapVillage = [
{name: "leaf", src: "js/leaf.png"},
{name: "sand", src: "js/sand.png"},
{name: "stone", src: "js/stone.png"},
{name: "cloud", src: "js/cloud.png"},
{name: "mist", src: "js/mist.png"},
{name: "rain", src: "js/rain.png"},
{name: "grass", src: "js/grass.png"},
{name: "sound", src: "js/sound.png"},
{name: "hotwater", src: "js/hotwater.png"},
{name: "waterfall", src: "js/waterfall.png"}
];
for(var i = 0; i < mapVillage.length; i++){
var b = mapVillage[i];
b = new Sprite(game.width, game.height);
b.image = game.assets[b.src];
alert(b.name);
mapGroup.addChild(b);
}
binvar b = mapVillage[i]; b = new Sprite(game.width, game.height);bcannot be both an entry in themapVillagearray and a new Sprite at the same time.