Skip to main content
Known Participant
August 31, 2007
Question

xml tags.....

  • August 31, 2007
  • 6 replies
  • 740 views
HI,

Can someone tell me if there only certain tags in xml that flash recognises, i know this is true with HTML and flash but is it the same in xml? I have an xml file with tags suchs as...'title', 'main', 'thumb'. Im trying to add other tags such as 'description' but cant get flash to read it, in the text field in flash were the 'description' attribute should be i just get an 'undefined'. Why would this be...
(i've included an example of the xml file below)..

thanks for any help....


This topic has been closed for replies.

6 replies

Inspiring
September 1, 2007
"i guess you know what its like to be totally swamped by a flash project!!"

Unfortunately I do.
I am glad to hear that you got that section working.
Inspiring
August 31, 2007
In the onRelease event handler put the following trace statement;

trace(this.description);

What does that return? Also does extText_txt resides in the thumbHolder movieclip? It should.
Known Participant
August 31, 2007
myIP, thank you so much for your help.....

In the trace output i get the description from the xml file which is great....which means its reading the xml file.....my last problem is creating the textfield inside the thumbHolder mc. I cant seem to do this properly now....my head is falling apart with this thing!!

I have this but it wont work....sorry for the constant questions, i guess you know what its like to be totally swamped by a flash project!!

Thanks again.
Known Participant
August 31, 2007
Thanks myIP...alls working fine now (well, this section of it at least)...

Thanks again!!..
Known Participant
August 31, 2007
Hi myIP,

Thanks for your help, but i still cant get it to work, this is so frustrating.....I tried what you suggested....any other ideas?


Thanks again...
Inspiring
August 31, 2007
this.description is never defined. You defined title and main correctly. So now you just need to add a property to ThumbHolder like below;

this.thumbHolder.description = this.picHolder.attributes.description;
Inspiring
August 31, 2007
The XML node you posted has two tags; photo and image. title, main, thumb are XML attributes. Perhaps you are calling a nodeValue when you should be calling an attribute.

Anyways showing some code would help.
Known Participant
August 31, 2007
Hi,

Thanks for the replies....sorry for being vauge, im still trying to get to grips with xml and flash...im fine with the basics but im trying to push myself with it....

The text field i am having trouble with is "extText_txt.text = this.description;" It should load the description tag from the xml.....what am i doing wrong?


Thanks for the help though....


Here is the code (below) .

Participating Frequently
August 31, 2007
whats your code to load the xml?