<?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>Webdevotion.be &#187; Air</title>
	<atom:link href="http://www.webdevotion.be/blog/tag/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevotion.be/blog</link>
	<description>Trainer for the Flash Platform and iOS</description>
	<lastBuildDate>Tue, 01 Nov 2011 10:14:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Snippet day: last comma becomes &#8220;and&#8221;</title>
		<link>http://www.webdevotion.be/blog/2009/04/09/snippet-day-last-comma-becomes-and/</link>
		<comments>http://www.webdevotion.be/blog/2009/04/09/snippet-day-last-comma-becomes-and/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 08:25:40 +0000</pubDate>
		<dc:creator>Webdevotion</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://webdevotion.be/blog/?p=243</guid>
		<description><![CDATA[This little snippet will replace the last comma in a string by the word &#8221; and &#8220;. Making it more readable for the end user. In other words: the string &#8220;Other examples are rats, mice,other rodents&#8221; will be converted into &#8230; <a href="http://www.webdevotion.be/blog/2009/04/09/snippet-day-last-comma-becomes-and/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This little snippet will replace the last comma in a string by the word &#8221; and &#8220;.  Making it more readable for the end user. </p>
<p>In other words: the string &#8220;Other examples are rats, mice,other rodents&#8221; will be converted into &#8220;Other examples are rats, mice and other rodents&#8221;.<br />
<span id="more-243"></span><br />
<code><br />
var a : Array = ["rats","mice","other rodents"];<br />
var s : String = a.toString(); // returns rats,mice,other rodents<br />
var r : RegExp = /,(?![^,]+,)/g; // the magical formula<br />
s = s.replace( r ," and "); // replace the last , with and<br />
trace( s ); // rats, mice and rodents<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdevotion.be/blog/2009/04/09/snippet-day-last-comma-becomes-and/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Job opening at Mr. Henry</title>
		<link>http://www.webdevotion.be/blog/2009/02/25/job-opening-at-mr-henry/</link>
		<comments>http://www.webdevotion.be/blog/2009/02/25/job-opening-at-mr-henry/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 11:01:06 +0000</pubDate>
		<dc:creator>Webdevotion</dc:creator>
				<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[coder]]></category>
		<category><![CDATA[full time]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[on site]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://webdevotion.be/blog/?p=237</guid>
		<description><![CDATA[We are looking for a developer for the Flash Platform. It&#8217;s a full time, on site position for our office in Antwerp. Get more info on our jobpage: http://workingat.mrhenry.be/]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mrhenry.be">We</a> are looking for a developer for the Flash Platform.  It&#8217;s a full time, on site position for our office in Antwerp.</p>
<p>Get more info on our jobpage: <a href="http://workingat.mrhenry.be/">http://workingat.mrhenry.be/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdevotion.be/blog/2009/02/25/job-opening-at-mr-henry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to PUT xml to a REST interface with Basic Authentication</title>
		<link>http://www.webdevotion.be/blog/2008/12/12/how-to-put-xml-to-a-rest-interface-with-basic-authentication/</link>
		<comments>http://www.webdevotion.be/blog/2008/12/12/how-to-put-xml-to-a-rest-interface-with-basic-authentication/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 12:36:31 +0000</pubDate>
		<dc:creator>Webdevotion</dc:creator>
				<category><![CDATA[Air]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[assembla]]></category>
		<category><![CDATA[basic auth]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[httprequest]]></category>
		<category><![CDATA[httpservice]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[urlloader]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://webdevotion.be/blog/?p=220</guid>
		<description><![CDATA[Well, this thing got me going for a couple of hours before things worked out. Using HTTPService did not seem to be the way to go. Long story short: URLRequest to the rescue! // basic authentication var encoder : Base64Encoder &#8230; <a href="http://www.webdevotion.be/blog/2008/12/12/how-to-put-xml-to-a-rest-interface-with-basic-authentication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, this thing got me going for a couple of hours before things worked out.  Using HTTPService did not seem to be the way to go.  Long story short: URLRequest to the rescue!</p>
<p><img src="http://webdevotion.be/blog/wp-content/xml-rest-api.jpg" alt="" title="xml-rest-api"  width="600" class="alignnone size-full wp-image-225" /></p>
<p><span id="more-220"></span><br />
<code><br />
// basic authentication<br />
var encoder : Base64Encoder = new Base64Encoder();<br />
encoder.encode(username + ":" password);<br />
// send xml<br />
var header1:URLRequestHeader = new URLRequestHeader("Content-Type", "application/xml");<br />
// authenticate<br />
var header2:URLRequestHeader = new URLRequestHeader("Authorization", "Basic " + encoder.toString());<br />
// accept xml as response<br />
var header3:URLRequestHeader = new URLRequestHeader("Accept","application/xml");</p>
<p>var request:URLRequest = new URLRequest( urlToRestAPI );<br />
// mmm, maybe not necessary = allready in the headers<br />
request.contentType = "application/xml";<br />
// push the headers in the request<br />
request.requestHeaders.push(header1);<br />
request.requestHeaders.push(header2);<br />
request.requestHeaders.push(header3);</p>
<p>// put your xml in a string: &quot;&lt;ticket&gt;&lt;summary&gt;my summary&lt;/summary&gt;&lt;/ticket&gt;&quot;<br />
// generate an XML instance from the string<br />
var xml : XML = new XML( s );<br />
// put the xml in the request instance<br />
request.data = xml;<br />
// use PUT ( could depend on the API you are using, check the docs )<br />
request.method = "PUT";<br />
// use the loader to send the request<br />
var loader : URLLoader = new URLLoader( null );<br />
// wait for the complete event to do other amazing things<br />
loader.addEventListener(Event.COMPLETE,onTicketUpdated,false,0,true);<br />
// fire in the hole!<br />
loader.load( request );<br />
// take a deep breath and wait a sec<br />
// for the complete event to be triggered<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdevotion.be/blog/2008/12/12/how-to-put-xml-to-a-rest-interface-with-basic-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

