I’m trying to add images from an XML and making them clickable. It’s been a while since I did some actionscripting, som I’m a little rusty. Thought this would work but they won’t let me click them Any ideas?
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = processXMLData;
xmlData.load("bilder.xml");
var img = new Array();
var holdNum = new String();
var rh = new String();
var base = _root.baseHolder;
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
function processXMLData(success) {
if (success) {
for (var i=0; i < this.firstChild.childNodes.length; i++) {
img* = this.firstChild.childNodes*.attributes.src;
}
var totImg = img.length;
for(var j=0; j < totImg; j++) {
holdNum = "imgHolder" + j;
_root.createEmptyMovieClip(holdNum, _root.getNextHighestDepth());
mcLoader.loadClip(img[j], holdNum);
rh = _root[holdNum];
sc = 16;
rh._xscale = sc;
rh._yscale = sc;
rh._x = j*150;
rh.onRelease = function () {
trace("working");
}
}
}
}