hente variabel og skrive dem som buttons.
hejjeg er kommet et stykke men jeg er gået i stå.
der hvor jeg har skrevet:
w.onRelease = function() {gotoAndStop(10);}
den vil ikke bruge variablen w.
Hvis jeg skriver en af værdierne fx "j1" så vil den gerne reagere på den knap med det "name"
....................
stop()
function clicked() {
trace("You clicked the button!");
}
//-----------------
var linksXML = new XML();
linksXML.ignoreWhite = true;
linksXML.load("http://localhost/flash/flashQ/selectTest_flashx.php");
linksXML.onLoad = checkLoading;
function checkLoading(success) {
if (success == true) {
var rootNode = linksXML.firstChild;
var total = rootNode.childNodes.length;
//Load the links Text
var tLink = rootNode.firstChild;
for (i=0;i<total;i++) {
var totalInner = tLink.childNodes.length;
var tnLink = tLink.firstChild;
//trace(tLink)
a = tLink.attributes.ref; ///her får vi attributten
//trace(a)
// ...button
var w="j"+i
_root.attachMovie("Button", w , _root.getNextHighestDepth());
_root[w].label = w ;
_root[w]._y = 25*i;
w.onRelease = function() {gotoAndStop(10);}
//::::button slut
tLink = tLink.nextSibling; //
}
//gotoAndStop(2);
}
}
