|
-
I got it working.. as a side not, since I have been working on this all day and the solution made me feel like an idiot.. In the AS when you are setting the text. You need to be sure you pass the nodeValue... I was doing this:
myTxt.txt = xmlNode.firstChild
That was wrong.. It was rendering the text, but it would not do the link... then I did this:
myTxt = xmlNode.firstChild.nodeValue
and that did the trick.
-
hi logix
sorry i didn't reply... my email notifications don't work, so i have to manually check my subscriptions (i've informed the moderators but no response as yet)...
but glad to hear you got it working!!
-
If anyone could help me out, please. I don't understand how to make links in a xml. And I've read through a lot of post and some of the links here. Most of them used an older flash player and thus didn't work with mine. So far it has been quite easy to work in xml and Flash but I'm completely lost in thi case. Here's my code for my xml file. I use flashplayer 7 and as 2.0:
Code:
stop();
container.stop();
var timeline = this;
System.useCodepage = true;
var loader2:XML = new XML();
loader2.load("files/Filer/Flash/overskrift.xml");
loader2.ignoreWhite = true;
loader2.onLoad = function() {
_global.rod2 = this.firstChild.childNodes;
var antalXML:Number = rod2.length-1;
setter(0);
};
setter = function (id) {
timeline.container_overskrift.overskrift.text = rod2[id].firstChild.firstChild.nodeValue;
timeline.container_overskrift.overskrift.autoSize = true;
timeline.container_overskrift.overskrift.multiline = true;
};
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
var loader:XML = new XML();
loader.load("files/Filer/Flash/tekst.xml");
loader.ignoreWhite = true;
loader.onLoad = function() {
_global.rod = this.firstChild.childNodes;
var antalXML:Number = rod.length-1;
for (i=0; i<1; i++) {
var randomNumber:Number = randRange(0, antalXML);
}
setter2(randomNumber);
};
setter2 = function (id) {
timeline.container.holder.tekst1.text = rod[id].firstChild.firstChild.nodeValue;
timeline.container.holder.tekst1.multiline = true;
timeline.container.holder.tekst2.text = rod[id].firstChild.nextSibling.firstChild;
timeline.container.holder.tekst2.multiline = true;
container.play();
_global.antal = id;
};
Regards
Michael
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|