Jump to content


XML Help


  • You cannot reply to this topic
8 replies to this topic

#1 Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 11 October 2006 - 11:51 AM

I'm trying to rebuild my personal site in flash, which has proven to be dumb for someone on my level of flash. I'm having problems with the portfolio area, Its nothing big really. I'm trying to use an xml file to display 3 properties in the flash file, Client Name, Project Type, and Description. And when i visit the flash file i see this;
http://www.rawgfx.5gigs.com/thefile (excuse my frustration on the file name lol..

also this is altered from the getxmldata xml file that was posted on here. i found the xml file but couldnt find the tut! if possible just a link to the tutorial would be preferred, because i went blind on the code mostly. so it may be best to restart fresh.

Edited by Wowzers, 11 October 2006 - 11:56 AM.


#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 11 October 2006 - 11:56 AM

what exactly is your setup like of the fla like?

#3 Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 12 October 2006 - 01:37 AM

Like the actionscript?

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 12 October 2006 - 03:52 AM

yeh as well the xml

#5 Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 12 October 2006 - 05:24 AM

XML:
<?xml version="1.0" encoding="utf-8" ?> 
<getxmldata>
<xmldoc>Grrrr!</xmldoc>
<node_name>Work!</node_name>
<topic>muwahaha</topic>
<author>yay!!!</author>
</getxmldata>

ActionScript:
Frame 1:
getxmldata=new XML();
getxmldata.load("http://rawgfx.5gigs.com/getxmldata.xml","");
stop();

Frame 3:
if (getxmldata.loaded){
	var p = getxmldata.firstChild;
	xmldoc = getxmldata.childNodes;
	node_name=p.nodeName;
	topic=p.attributes.topic;
	author=p.attributes.author;
}


#6 pixelDepth

    Young Padawan

  • Members
  • Pip
  • 6 posts
  • Location:Suffolk, UK

Posted 12 October 2006 - 09:41 AM

The way you are doing it seems to be like this tutorial...

http://www.smartwebb...ternal_data.asp

Pay attention to the XML file example here...

http://www.smartwebb...ash/xmldata.xml

#7 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 12 October 2006 - 12:20 PM

Have a look at this tutorial, maybe better for this situation:
http://www.pixel2life.com/publish/tutorial...eginners_guide/

#8 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 12 October 2006 - 04:39 PM

Frame 1:
var myXML:XML = new XML();
myXML.load("http://rawgfx.5gigs.com/getxmldata.xml");

Frame 3:
myXML.onLoad = function(success:Boolean) {
if(success) {
node_name = this.firstChild.childNodes[2].nodeValue;
topic = this.firstChild.childNodes[3].nodeValue;
author= this.firstChild.childNodes[4].nodeValue;
}
}

Edited by d4rkst0n3, 12 October 2006 - 04:41 PM.


#9 Wowzers

    Young Padawan

  • Members
  • Pip
  • 40 posts

Posted 12 October 2006 - 11:19 PM

Thankyou everyone.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users