Hi all!
I am trying to attach a movieclip and make rows with 3 movieclips each. I can attach the moveclips and make space between them but i cant figure how i can make rows… :h:
Thank’s in advance!
here’s the code
var gamesData:XML = new XML();
gamesData.ignoreWhite = true;
gamesData.load("xml/games.xml");
var pos = 0;
gamesData.onLoad = function(bSuccess:Boolean):Void {
if (bSuccess) {
var xmlNode = this.firstChild.childNodes;
for (var i = 0; i<xmlNode.length; i++) {
var id = xmlNode*.attributes.id;
if(i >= 1) {
pos +=210;
}
gHolder.attachMovie("game", "gameHolder"+i, gHolder.getNextHighestDepth());
trace(gHolder["gameHolder"+i]);
gHolder["gameHolder"+i]._x = pos;
gHolder["gameHolder"+i].picture = loadMovie(xmlNode*.attributes.jpg, gHolder["gameHolder"+i].getNextHighestDepth());
gHolder["gameHolder"+i].gametitle.text = xmlNode*.attributes.gamestitle;
gHolder["gameHolder"+i].gamedesc.text = xmlNode*.attributes.desc;
gHolder["gameHolder"+i].onRelease = function() {
getURL("games.php?id="+id+"", "_self");
};
}
} else {
trace("error");
}
};
stop();