Hi all!
Ok here’s the deal
I attach movieclips from the library dynamic and make rows of 3. How can i make them scroll vertical with hitTest()? The only thing i know is how to make the mask… lol :ponder:
Here is the code:
var gamesData:XML = new XML();
gamesData.ignoreWhite = true;
gamesData.load("xml/games.xml");
gamesData.onLoad = function(bSuccess:Boolean):Void {
if (bSuccess) {
var xmlNode = this.firstChild.childNodes;
var spacing = 210;
var xPos = 0;
var yPos = 0;
for (var i = 0; i<xmlNode.length; i++) {
var id = xmlNode*.attributes.id;
gHolder.attachMovie("game", "gameHolder"+i, gHolder.getNextHighestDepth());
gHolder["gameHolder"+i]._x = (i%3)*spacing;
gHolder["gameHolder"+i]._y = Math.floor(i/3)*90;
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();