Xml Variable

Hi, there all

I have a script wich loads XML structured text, and one line or tag has an URL-hyperlink wich works fine… BUT I find out that instead of going to an URL when clicking this active-xml-text I need a gotoAndStop() … IS IT POSIBLE?

thanks all of you!

felipe@mexmags.com

well, depending on how you are setting up xml doc.

<myNode gAP=10 />
```php

do something like that and when you parse:

myframe = Number(myxml.childNodes[nodeNum].attributes.gAP);
gotoAndPlay(myframe);

SORRY I SEND YOU A (PM)

Thanks for all your help!

I successfuly generate variables with attributes, but now the text is no longer hyperlink active (mouse does not react to it) now that I use attributes to pass variables how do I say to flash that if you click that line gotoAndStop…bla…bla…

Yeah, it’s possible. You can use the [font=courier new]asfunction[/font] protocol to call the [font=courier new]gotoAndStop()[/font] function.

That would be something along these lines:

<parentnode>
<childnode>Frame 2? <a href="asfunction:gotoAndStop,2">Go!</a></childnode>
</parentnode>
var my_xml = new XML();
my_xml.onLoad = function(success) {
if (success) {
my_txt.html = true;
my_txt.htmlText = this.firstChild.firstChild.childNodes;
}
};
my_xml.load("file.xml");

And run a search for “asfunction” in the forum, you should find some threads about it. :wink:

Kode… gracias compadre!

I will try it on later, will contact you tolet you know!

Im from Puerto Vallarta, Mexico

Ok! No tiene pierde, pero si no te sale nada más me avisas y veremos que hacer. :stuck_out_tongue:

…Y por cierto, yo soy de Guanajuato. :slight_smile:

que onda kode…

It works fine, but now i have a nother question: instead of using a number or label to go to; how can i use a global variable wich contains the frame I want it to go to. (the value of this global comes from an attribute from the XML, I test it and it shows the exact value)

Gracias!

I GOT IT!!! …THANKS KODE!!!

…You’re welcome, signx. :wink:

It wasn’t that hard after all, was it? :stuck_out_tongue: