<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">
<channel><title><![CDATA[ActionScript.org Flash, Flex and ActionScript Resources - Comments for blog: Colin Moock on Actionscript 4 (FITC Amsterdam 2008)]]></title><link>http://www.actionscript.org/resources</link><description /><language>en-us</language><copyright><![CDATA[http://www.actionscript.org/resources]]></copyright><generator>N/A</generator><webMaster>general.redirect@gmail.com</webMaster><lastBuildDate>Mon, 23 Nov 2009 01:05:06 CST</lastBuildDate><ttl>20</ttl><item><title><![CDATA[Comment #1]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment1405</link><description><![CDATA[just much more elgent way of xml indexing:

XMLNode.prototype.searchXML = function() {
	var pointer = this.firstChild;
	while (pointer.parentNode.hasChildNodes()) {
		//Type here all your refrences to 'pointer'
		if (!pointer.searchXML()) {
			pointer = pointer.nextSibling;
		}
	}
};

use this to call function:

my_xml = new XML();
my_xml.load("test.xml");
my_xml.searchXML();


hope you like it :)<br/><br/>
(Comment posted by zeev at 5:32 pm, Tue 13th Mar 2007)]]></description><author>no@spam.com (zeev)</author><pubDate><![CDATA[Tue, 13 Mar 2007 17:32:50 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment1405</guid></item><item><title><![CDATA[Comment #2]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment2993</link><description><![CDATA[At the export_to_object example:

I have created a Movie that contains only a Dynamic text that shows the variable tx. The Movie instance name is "dt".
So i have inserted the following lines into the example:

at top:
c=1;

inside the for loop:

txt = xmlDoc_xml.firstChild.childNodes[n].nodeName + " = " + xmlDoc_xml.firstChild.childNodes[n].firstChild.nodeValue;

duplicateMovieClip("dt","dt"+c,c);
eval("dt"+c)._y = 20*c;
eval("dt"+c).tx = txt;
c++;
			
this should substitute the trace() commands and displays right into the Flash window a list like this: 

nodeName = nodeValue
....
nodeName = nodeValue


<br/><br/>
(Comment posted by Gabriel Gomes Jr. at 9:10 am, Thu 10th May 2007)]]></description><author>no@spam.com (Gabriel Gomes Jr.)</author><pubDate><![CDATA[Thu, 10 May 2007 09:10:20 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment2993</guid></item><item><title><![CDATA[Comment #3]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment3736</link><description><![CDATA[A bit of a confusing error in your article: when you talk about the problems with the ampersand character in XML files (half-way down page 2), you forgot to encode it properly in the HTML of your article, so it basically says "& rather than &", when I presume you meant "& rather than & amp;". You have to change the HTML to "& amp;amp;" to get it to display as "& amp;".

(By the way, I've added spaces in the example entities above, just to make sure they don't get parsed as entities when this comment is displayed. So ignore the spaces.)<br/><br/>
(Comment posted by Callum at 8:39 am, Tue 5th Jun 2007)]]></description><author>no@spam.com (Callum)</author><pubDate><![CDATA[Tue, 05 Jun 2007 08:39:25 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment3736</guid></item><item><title><![CDATA[Comment #4]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5052</link><description><![CDATA[Great tutorial on the basics. Didn't have a hard time understanding even though I am not too familiar with xml.<br/><br/>
(Comment posted by jandz at 2:30 am, Tue 31st Jul 2007)]]></description><author>no@spam.com (jandz)</author><pubDate><![CDATA[Tue, 31 Jul 2007 02:30:04 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5052</guid></item><item><title><![CDATA[Comment #5]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5354</link><description><![CDATA[The examples didn't work also I fallowed your tutorial step by step and it didn't work(the variables in which i put the nodeValues remain void all the time and my Dynamic text doesn't display anything).
What's wrong with my flash ?<br/><br/>
(Comment posted by Alex at 7:00 am, Mon 13th Aug 2007)]]></description><author>no@spam.com (Alex)</author><pubDate><![CDATA[Mon, 13 Aug 2007 07:00:47 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5354</guid></item><item><title><![CDATA[Comment #6]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5369</link><description><![CDATA[This tutorial is very useful for the persons who dont have any idea about XML. The language used is very simple.<br/><br/>
(Comment posted by somnath at 11:01 pm, Mon 13th Aug 2007)]]></description><author>no@spam.com (somnath)</author><pubDate><![CDATA[Mon, 13 Aug 2007 23:01:54 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment5369</guid></item><item><title><![CDATA[Comment #7]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment7653</link><description><![CDATA[Nice article, however, I was a little confused on how you re-referenced the xml document and wondered if this would work in Flash 8 using strict typing? <br/><br/>
(Comment posted by Gary Feeley at 4:22 pm, Wed 21st Nov 2007)]]></description><author>no@spam.com (Gary Feeley)</author><pubDate><![CDATA[Wed, 21 Nov 2007 16:22:50 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment7653</guid></item><item><title><![CDATA[Comment #8]]></title><link>http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12648</link><description><![CDATA[Any word on private constructors?<br/><br/>
(Comment posted by Xegnma at 1:23 pm, Sun 15th Feb 2009)]]></description><author>no@spam.com (Xegnma)</author><pubDate><![CDATA[Sun, 15 Feb 2009 13:23:28 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12648</guid></item><item><title><![CDATA[Comment #9]]></title><link>http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12649</link><description><![CDATA[Hey Xegnma, no I don't think he mentioned anything about private constructors, anyway, ecmascript3 is dead now, so doesn't matter anymore ;)<br/><br/>
(Comment posted by Ruben at 2:09 pm, Sun 15th Feb 2009)]]></description><author>no@spam.com (Ruben)</author><pubDate><![CDATA[Sun, 15 Feb 2009 14:09:11 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12649</guid></item><item><title><![CDATA[Comment #10]]></title><link>http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12715</link><description><![CDATA[What about multiple inheritance?<br/><br/>
(Comment posted by John Isaacks at 6:27 pm, Mon 2nd Mar 2009)]]></description><author>no@spam.com (John Isaacks)</author><pubDate><![CDATA[Mon, 02 Mar 2009 18:27:10 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment12715</guid></item><item><title><![CDATA[Comment #11]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment12996</link><description><![CDATA[Great article, I didn't know anything about actionscript or xml before this but now I have a pretty good feel for it.  Also if you wanted to display everything, in any given xml tree, using a recursive algorithm would be simple and effective.
This might work but haven't tested it and don't know if it's even written correctly.

function processBook(xmlDoc_xml) {
	//set up the recursive loop with the first child
	traceNodes(xmlDoc_xml.firstChild);
}

function traceNodes(currentNode) {
	//this is where it displays the values
	if(currentNode.nodeValue==null){
	        trace(currentNode.nodeName +":");
	}else{
        	        trace(currentNode.nodeName + ": " + currentNode.nodeValue);
	}

	//this loops through all the child nodes and displays each of them (and their child nodes)
	for (a in currentNode.childNodes) {
              	       traceNodes(currentNode.childNodes[a]);
        	}
}<br/><br/>
(Comment posted by Jax23 at 11:48 pm, Tue 12th May 2009)]]></description><author>no@spam.com (Jax23)</author><pubDate><![CDATA[Tue, 12 May 2009 23:48:28 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment12996</guid></item><item><title><![CDATA[Comment #12]]></title><link>http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment13029</link><description><![CDATA[Oooh! This all sounds wonderful. The fact that you can change data types on a variable is pretty deadgum cool! :P<br/><br/>
(Comment posted by UncleNinja at 3:52 pm, Sat 23rd May 2009)]]></description><author>no@spam.com (UncleNinja)</author><pubDate><![CDATA[Sat, 23 May 2009 15:52:03 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/9/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008.html#Comment13029</guid></item><item><title><![CDATA[Comment #13]]></title><link>http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment13630</link><description><![CDATA[I have a question - is there a way to determine if the value of a node is a String or a Number? 
ldXML.children()[1].elements()[i].nodeValue is Number  this always returns false regardless as does is String always returns true.. 

I'm using XML to dynamical create a sqlite DB and I need to be able to determine the column types not just their names. 

I've got it working by defining the data type in the xml itself as either Text or Real but this only works if I have control of the XML generation.<br/><br/>
(Comment posted by Aaron at 12:38 pm, Wed 28th Oct 2009)]]></description><author>no@spam.com (Aaron)</author><pubDate><![CDATA[Wed, 28 Oct 2009 12:38:52 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/0/1/Colin-Moock-on-Actionscript-4-FITC-Amsterdam-2008/Page1.html#Comment13630</guid></item></channel></rss>