<?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>Matt&#039;s Blog &#187; flex</title>
	<atom:link href="http://blog.mackenzie.ag/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mackenzie.ag</link>
	<description>140 characters isn&#039;t always enough.</description>
	<lastBuildDate>Fri, 30 Jul 2010 13:50:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=6083</generator>
		<item>
		<title>Load an AVIs IMDB page with Flex/Actionscript</title>
		<link>http://blog.mackenzie.ag/2009/02/01/load-an-avis-imdb-page-with-flexactionscript/</link>
		<comments>http://blog.mackenzie.ag/2009/02/01/load-an-avis-imdb-page-with-flexactionscript/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 16:20:30 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[imdb]]></category>

		<guid isPermaLink="false">http://mackenzie.ag/?p=66</guid>
		<description><![CDATA[I&#8217;m working a bit more on my media manager, and cooked up this useful code that others may benefit from. It uses the TRYNT Movie IMDB Web Service (v2) which, given a search term will return some IMDB URLs. Surprisingly, IMDB has no public API, so the TRYNT guys are using a data replica from [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;m working a bit more on my media manager, and cooked up this useful code that others may benefit from.  It uses the <a href="http://www.trynt.com/trynt-movie-imdb-api/">TRYNT Movie IMDB Web Service (v2)</a> which, given a search term will return some IMDB URLs.  Surprisingly, IMDB has no public API, so the TRYNT guys are using a data replica from IMDB on their own database I think&#8230; Here is the first pass code&#8230; I&#8217;m cleaning it up locally but it is good enough to see how this works&#8230;</p>
<pre>private function openIMDB(aviName:String):void {
  var movieName:String = aviName.slice(0, aviName.indexOf("."));
  var svc:HTTPService = new HTTPService();
  var vars:URLVariables = new URLVariables();
  vars.t = movieName;
  svc.url = "http://www.trynt.com/movie-imdb-api/v2/?" + vars.toString();
  svc.resultFormat = "e4x";
  svc.addEventListener("result",handleIMDBQuery);
  svc.send();
}
private function handleIMDBQuery(event:ResultEvent):void {
  if (event.result['movie-imdb'].error == "true") {
    mx.controls.Alert.show("Unable to find this movie on IMDB.", "IMDB error");
  }
  else {
    var url:String = event.result['movie-imdb']['matched-url'];
    navigateToURL(new URLRequest(url), "_blank");
  }
}</pre>
<p>Note to the TRYNT people&#8230; My application is for personal use, so I&#8217;ll put the attribution right here.  If I ever publish the AIR app, I&#8217;ll include your icon and a link to it&#8230;</p>
<p><a title="TRYNT Web Services" href="http://www.trynt.com/"><img title="TRYNT Web Services" src="http://images.trynt.com/trynt-powered.png" border="0" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mackenzie.ag/2009/02/01/load-an-avis-imdb-page-with-flexactionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
