Xml :: Get The ChildNodes Of Subcategory?
Dec 28, 2010Here is my XML that holds all images. I want the to get the childNodes of subcategory, sub1, sub2, sub3 etc...
< allImages>
<images>
<category>Architecture</category>[code]...........
Here is my XML that holds all images. I want the to get the childNodes of subcategory, sub1, sub2, sub3 etc...
< allImages>
<images>
<category>Architecture</category>[code]...........
I have sqlite table named categories with fields id, name, and parent_id. Sample data is much like:
id name parent_id
1 products 0
2 tools 0
[code].....
Inside my XML file, I want to have multiple child nodes nested in a parent node. But when I try to trace out the multiple child nodes, I only get the first child node in the trace, despite using "@" wildcard. Is it because the childnodes are named the same?
Code:
<gallery>
<project>
<desc>Description</desc>
[code]....
I currently have some XML which looks like this:[code] I don't have any <discount> in my second listing. The content of <discount> is being displayed upon some graphic which I'm tweening around. However if there's no discount, I want to set this movieclip to ._visible = false - since its pointless to have it tweening around when there's no text on it.How on earth would I check if <discount> exists or doesn't? In most cases it will be there, but in a few it won't.[code]
View 2 RepliesI am trying to build xml menu. Some nodes have childNodes some don't. I have a problem in my array loop : the movieclip that I use to create subMenu attached to the entire array. How can I make that the movieclip that I use for subMenu only attach to the nodes that having childNodes?
Here's the code :
Code:
function buildingMenu(){
buttonArray = myXml.firstChild.childNodes;
for (var i=0;i<buttonArray.length;i++)
{
[code]....
Is there a way to add ".childNodes[0]" to a var? Like if I have:
myVar = this.firstChild.childNodes[0].firstChild.nodeValue;
And if the user push a button I want myVar to be;
myVar = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
I'm workig on my portfolio and here is what Im running into...en I debug my fla the following XML shows up with extra "xmlobj.childNodes[1].childNodes["Right here"]hen I browse the file in the debugger (variables section) instead of 0,1 and 2 for childNodes the are 0-5??? and every other one is all null values... also they show up as [1] [2] [3] directly under xmlobj when I expand it can anyone tell me whats up with my xml? if its my script or you think it is I'll post the code/fla if I need to... alsoMy xml will be dynamically created via a php -> mysql script eventually (I have that worked out I just need to get this working so I can properly format my php-> xml output for flash which is what I think my problem is.
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ROOT>
[code].....
I'm having trouble loading a XML file with AS2.0. I'll copy&paste a reduced version of my XML.
[Code].....
[Code]...
THE ABOVE NEEDS TO BE MODIFIED TO ALLOW MULIPLE EVENTS... I'VE BEEN WORKING ON IT FOR DAYS....
[Code]....
I'm trying to get my XML info into movieclips called "button_1" - "button_7" I have my XML ChildNodes showing up in my output window when I export my swf. I used the xml class to load into an xml instance So how do I assign the data to my movieclips.
Here's my code thus far:
stop();
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;import flash.net.URLVariables;
var numOfImages = 90;var imgNum = 0;
[Code] .....
[Code]...
I it to randomly pick one of the childNodes and display it in the container. I tried to place in a Math.random(); but I wasn't sure where to put it.
I have a movie clip in my library linked as aboutUsMenuBtn. And I as get the childNodes.nodeName from the XML file, I want them to be assigned to a dynamic text field "btn_txt" inside of the aboutUsMenuBtn. With each node, a button is going to be attached to the aboutUs stage (I'm working using a Flash Form Application).
[Code]...
I am trying to use Kirupa's XML drop down menu(action script 2.0): aka: [URL] however I cannot have it output the childNode. This is because it is using a for loop with the curr_item variable. when I try to trace the for loop count variable, it just returns the last for loop variable. I basically want it so that when I click on a button on the 3rd tier submenu, I want it to output all the prior tiers that the button belongs in.
View 2 Replies