<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>this is the personal weblog of Andy Widodo &#187; XML</title>
	<atom:link href="http://playgroundpilot.com/archives/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://playgroundpilot.com</link>
	<description>Hi I&#039;m Andy</description>
	<lastBuildDate>Sun, 10 Jul 2011 17:17:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flash LastFM RSS reader</title>
		<link>http://playgroundpilot.com/archives/2007/flash-lastfm-rss-reader/</link>
		<comments>http://playgroundpilot.com/archives/2007/flash-lastfm-rss-reader/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 08:10:44 +0000</pubDate>
		<dc:creator>andy</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[lastfm]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://playgroundpilot.com/journal/archives/2007/flash-lastfm-rss-reader/</guid>
		<description><![CDATA[If you are a lastFM user, you know that lastFM provides several datafeeds to be fetched for free use, for example you can fetch the data feed to be shown on your website, and the datafeeds itselves could be your recently played tracks, recent weekly artists or maybe your lastFM friends list. In my previous [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a <a title="LastFM" href="http://www.last.fm">lastFM</a> user, you know that <a title="LastFM" href="http://www.last.fm">lastFM</a> provides several datafeeds to be fetched for free use, for example you can fetch the data feed to be shown on your website, and the datafeeds itselves could be your recently played tracks, recent weekly artists or maybe your <a title="LastFM" href="http://www.last.fm">lastFM</a> friends list.</p>
<p>In my <a title="Flash and XML" href="http://playgroundpilot.com/archives/2007/flash-and-xml/">previous post</a> i have written about Flash and XML connectivity. Based on it, I wrote a Flash code to fetch the datafeed from <a title="LastFM" href="http://www.last.fm">lastFM</a> (here, the Flash code will fetch the recently played tracks data feed).</p>
<p style="text-align: center"><img id="image86" class="imgpost" style="width: 275px; height: 532px" src="http://playgroundpilot.com/wp-content/uploads/2007/03/lastfm_flash.gif" alt="lastfm - flash" /></p>
<p>So, <a title="lastfm-flash" href="http://playgroundpilot.com/wp-content/uploads/2007/03/flash_lastfm.zip">grab it</a> and make some changes (and some sweet decorations probably..) to anything which suits to your needs&#8230;enjoy :)</p>
]]></content:encoded>
			<wfw:commentRss>http://playgroundpilot.com/archives/2007/flash-lastfm-rss-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash and XML</title>
		<link>http://playgroundpilot.com/archives/2007/flash-and-xml/</link>
		<comments>http://playgroundpilot.com/archives/2007/flash-and-xml/#comments</comments>
		<pubDate>Tue, 23 Jan 2007 03:23:53 +0000</pubDate>
		<dc:creator>andy</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://playgroundpilot.com/journal/2007/01/23/flash-and-xml/</guid>
		<description><![CDATA[We know that Macromedia Flash has the ability to load an xml file. And now I&#8217;m trying to share a simple way about how to load an XML file into Flash. Firstly, let&#8217;s make an XML dummy file to be loaded later into Flash, you can use any text editor (notepad, dreamweaver&#8230;anything), write this code [...]]]></description>
			<content:encoded><![CDATA[<p>We know that Macromedia Flash has the ability to load an xml file. And now I&#8217;m trying to share a simple way about how to load an XML file into Flash.<br />
Firstly, let&#8217;s make an XML dummy file to be loaded later into Flash, you can use any text editor (notepad, dreamweaver&#8230;anything), write this code below :</p>
<ol class="code">
<li class="t0">&lt;data&gt;</li>
<li class="t0">&lt;menu&gt;elemen 1&lt;/menu&gt;</li>
<li class="t0">&lt;menu&gt;elemen 2&lt;/menu&gt;</li>
<li class="t0">&lt;menu&gt;elemen 3&lt;/menu&gt;</li>
<li class="t0">&lt;menu&gt;elemen 4&lt;/menu&gt;</li>
<li class="t0">&lt;menu&gt;elemen 5&lt;/menu&gt;</li>
<li class="t0">&lt;menu&gt;elemen 6&lt;/menu&gt;</li>
<li class="t0">&lt;/data&gt;</li>
</ol>
<p>When you have done, save it with name &#8216;data.xml&#8217;.<span id="more-68"></span></p>
<p>Then, let&#8217;s switch to Macromedia Flash, firstly create a dynamic text field by using &#8216;Type Tool&#8217;and choose &#8216;Dynamic Text&#8217; on its property and give a name of your text field (here we name it &#8216;txtnya&#8217;), when you have done&#8230;create a new layer (just to separate between the code and everything on the main stage, so that it will be easier to make editing to the code), then open the ActionScript editor, and write these lines :</p>
<ol class="code">
<li class="t0">my_xml = new XML() // to tell flash that we are using XML object and its methods in flash.</li>
<li class="t0">my_xml.ignoreWhite = true; // ignore the whitespace in the XML file</li>
<li class="t0">my_xml.onLoad = function(status){</li>
<li class="t0">if (status){</li>
<li class="t0">if (this.firstChild.nodeName.toUpperCase() == &#8220;DATA&#8221;) //to detect the &#8216;data&#8217; tag as the first node in our XML file we just made</li>
<li class="t0">{</li>
<li class="t0">top = this.firstChild; //first node and its childs</li>
<li class="t0">content=&#8221;"; //to replace the &#8216;undefined&#8217; in the first node</li>
<li class="t0">if (top != null)</li>
<li class="t0">{</li>
<li class="t0">menu = top.firstChild; //menu node</li>
<li class="t0">//a loop to detect if there are &#8216;menu&#8217; nodes in our xml file then print them them to the screen</li>
<li class="t0">while (menu != null)</li>
<li class="t0">{</li>
<li class="t0">if(menu.nodeName.toUpperCase()==&#8221;MENU&#8221;)</li>
<li class="t0">{</li>
<li class="t0">isi = menu.firstChild.nodeValue; //input the value of the &#8216;menu&#8217; node into a variable named &#8216;isi&#8217;</li>
<li class="t0">}</li>
<li class="t0">content += &#8220;&lt;font size=&#8221;10&#8243; color=&#8221;#3366cc&#8221;&gt;&#8221;+isi+&#8221;&lt;/font&gt;</li>
<li class="t0">&#8220;;</li>
<li class="t0">txtnya.html = true; //set the dynamic text field into &#8216;html mode&#8217;</li>
<li class="t0">txtnya.htmlText = content; //print the value of the &#8216;menu&#8217; nodes</li>
<li class="t0">menu = menu.nextSibling; //go to the next parent node</li>
<li class="t0">}</li>
<li class="t0">}</li>
<li class="t0">}</li>
<li class="t0">}else{</li>
<li class="t0">txtnya.text = &#8220;Failed&#8221;;</li>
<li class="t0">}</li>
<li class="t0">};</li>
</ol>
<p>Last, add this one tiny line :</p>
<ol class="code">
<li class="t0">my_xml.load(&#8220;data.xml&#8221;); //to call the XML file</li>
</ol>
<p>Now that we&#8217;ve done and you can preview your flash movie with the XML data is formatted by flash and presented within a movie. Please remember that in this tutorial the XML data and the flash movie file are within one directory.</p>
<p>Hopefully this helps, and you can develop it into the form which suits your needs.<br />
You can download the tutorial files <a id="p67" href="http://playgroundpilot.com/wp-content/uploads/2007/01/flashxml.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://playgroundpilot.com/archives/2007/flash-and-xml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

