<?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>distriqt // labs &#187; tips</title>
	<atom:link href="http://labs.distriqt.com/category/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://labs.distriqt.com</link>
	<description>flash platform &#38; digital development australia</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:24:57 +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>Launching Multiple Instances of Eclipse</title>
		<link>http://labs.distriqt.com/post/844</link>
		<comments>http://labs.distriqt.com/post/844#comments</comments>
		<pubDate>Fri, 27 Jan 2012 00:24:57 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=844</guid>
		<description><![CDATA[I've been a fan of Eclipse for a long time now, even before FDT and Flash Builder were built around it. The use of workspaces, once you get your head around them, is powerful for focusing your head on the work at hand, keeping all associated projects within the one space. However there are times [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F844"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F844&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've been a fan of Eclipse for a long time now, even before FDT and Flash Builder were built around it. The use of workspaces, once you get your head around them, is powerful for focusing your head on the work at hand, keeping all associated projects within the one space.</p>
<p>However there are times when I wish I was able to have multiple workspaces open. And too the rescue comes the command line.<br />
<span id="more-844"></span></p>
<pre>[Path/To/Eclipse]/eclipse -data [Your/Workspace/Dir] &
</pre>
<p><br/><br />
I've wrapped this up into a little bash script to start eclipse from either the current directory or using the specified directory as the workspace:</p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/bin/sh</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> -n <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	/Applications/eclipse/eclipse  -data $<span style="color: #000000;">1</span> &amp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">else</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	/Applications/eclipse/eclipse  -data `<span style="color: #7a0874; font-weight: bold;">pwd</span>` &amp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">fi</span></div></li></ol></pre>
<p><br/></p>
<p>On OSX it's better to use the open command, like:</p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/bin/sh</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> -n <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	open -n /Applications/eclipse/Eclipse.app --args  -data $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">else</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	open -n /Applications/eclipse/Eclipse.app --args  -data `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">fi</span></div></li></ol></pre>
<p><br/><br />
This will work equally as well with the Flash Builder application, just replace the Eclipse.app with the path to Flash Builder.</p>
<p>Happy workspacing!</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/844"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/844/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native Extensions: A Simple Guide</title>
		<link>http://labs.distriqt.com/post/815</link>
		<comments>http://labs.distriqt.com/post/815#comments</comments>
		<pubDate>Tue, 17 Jan 2012 10:30:19 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[ane]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash-builder]]></category>
		<category><![CDATA[native-extension]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=815</guid>
		<description><![CDATA[We've been doing a lot with Native Extensions for AIR lately, both in Android and iOS, and I just wanted to put together a quick "how to" on using other people's Actionscript Native Extensions (ANE) in Flash Builder 4.6. I'm going to assume you already understand the process of developing and deploying mobile applications using [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F815"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F815&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We've been doing a lot with Native Extensions for AIR lately, both in Android and iOS, and I just wanted to put together a quick "how to" on using other people's Actionscript Native Extensions (ANE) in Flash Builder 4.6.</p>
<p>I'm going to assume you already understand the process of developing and deploying mobile applications using AIR.</p>
<p>The process is quite simple, you'll need the supplied ANE for the extension. In your mobile project you want to add it into, open up the project properties (Right click / Properties) and find the "Actionscript Build Path" (or "Flex Build Path" if it's a Flex project).</p>
<p>You'll see a tab up the top labeled "Native Extensions" in which you can "Add ANE...". Click on this and select the ANE extension file. Once it's added in, you can expand out the details of the extension to see the target platforms supported by the extension. Below I'm showing the details on our Android Camera Extension. </p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/ane-build-path1.png" rel="shadowbox[sbpost-815];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/ane-build-path1-548x450.png" alt="" title="ane-build-path" width="548" height="450" class="alignnone size-medium wp-image-818" /></a><br />
<span id="more-815"></span><br />
The extension is now included in your project, however before you leave here I suggest you go to the "Build Packaging" for the platforms you are deploying and check the extension is going to be packaged (and available) with them.</p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/ane-build-packaging.png" rel="shadowbox[sbpost-815];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/ane-build-packaging-592x450.png" alt="" title="ane-build-packaging" width="592" height="450" class="alignnone size-medium wp-image-819" /></a> </p>
<p>You should now be able to return to your code and use the functionality and classes supplied in the extension, hopefully you've been supplied with documentation or example usage of the extension!</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/815"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/815/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN global-ignores</title>
		<link>http://labs.distriqt.com/post/701</link>
		<comments>http://labs.distriqt.com/post/701#comments</comments>
		<pubDate>Thu, 15 Dec 2011 05:59:38 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=701</guid>
		<description><![CDATA[Well if you use OSX or any program that produces metadata files on your file-system, it can become a nightmare trying to sort through the files you need to check in to svn... However! Once you discover there is a little hidden global ignore feature in svn, all the horror goes away. On OSX the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F701"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F701&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Well if you use OSX or any program that produces metadata files on your file-system, it can become a nightmare trying to sort through the files you need to check in to svn... However! Once you discover there is a little hidden global ignore feature in svn, all the horror goes away.</p>
<p>On OSX the file of concern is located :</p>
<p><code>~/.subversion/config</code></p>
<p>Linux (sometimes) :</p>
<p><code>/etc/subversion/config</code></p>
<p>Windows... No idea sorry, depends on your client, though apparently TortoiseSVN has it as an option...</p>
<p>To add a file or folder to the list just open up that file and find the "global-ignores" option. It's just a space separated list of potential file or folder names that you want to ignore.</p>
<p>Mine now looks like this:</p>
<p><code>global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo _notes .DS_Store .#* .AppleDouble *:2e_* ._*</code></p>
<p>Have fun with a cleaner svn... </p>
<hr/>
More information on the config options:<br />
<a href="http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2">Subversion Manual: Config</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/701"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/701/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Android Notification Example</title>
		<link>http://labs.distriqt.com/post/648</link>
		<comments>http://labs.distriqt.com/post/648#comments</comments>
		<pubDate>Wed, 20 Jul 2011 06:42:25 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=648</guid>
		<description><![CDATA[So we all know and love our Android notification bar. So I just wanted to post a quick example application to show how easy it is to display a local notification. The process runs something like this: retrieve a reference to the NotificationManager create a Notification notify the manager of the notification you've created The [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F648"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F648&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/07/notification_helloworld.jpg" alt="" title="notification_helloworld" width="580" height="292" class="aligncenter size-full wp-image-661" /></p>
<p>So we all know and love our Android notification bar. So I just wanted to post a quick example application to show how easy it is to display a local notification.</p>
<p>The process runs something like this:</p>
<ul>
<li>retrieve a reference to the NotificationManager</li>
<li>create a Notification</li>
<li>notify the manager of the notification you've created</li>
</ul>
<p><span id="more-648"></span></p>
<p>The Notification class, at it's simplest consists of an image icon and 3 pieces of text, one for the ticker, one as the title and the last as the content text.</p>
<pre class="java"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">package</span> com.<span style="color: #006600;">distriqt</span>.<span style="color: #006600;">mobile</span>.<span style="color: #006600;">experiments</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.app.Activity;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.app.Notification;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.app.NotificationManager;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.app.PendingIntent;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.content.Context;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.content.Intent;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import android.os.Bundle;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NotificationExperimentActivity <span style="color: #000000; font-weight: bold;">extends</span> Activity</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> HELLO_ID = <span style="color: #cc66cc;">1</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    @Override</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> onCreate<span style="color: #66cc66;">&#40;</span>Bundle savedInstanceState<span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006600;">onCreate</span><span style="color: #66cc66;">&#40;</span>savedInstanceState<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        setContentView<span style="color: #66cc66;">&#40;</span>R.<span style="color: #006600;">layout</span>.<span style="color: #006600;">main</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//  Look up the notification manager server</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        NotificationManager nm =</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #66cc66;">&#40;</span>NotificationManager<span style="color: #66cc66;">&#41;</span> getSystemService<span style="color: #66cc66;">&#40;</span>NOTIFICATION_SERVICE<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #808080; font-style: italic;">//  Create your notification</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #993333;">int</span> icon = R.<span style="color: #006600;">drawable</span>.<span style="color: #006600;">icon</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        CharSequence tickerText = <span style="color: #ff0000;">&quot;Hello&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #993333;">long</span> when = <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">currentTimeMillis</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        Notification notification =</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #000000; font-weight: bold;">new</span> Notification<span style="color: #66cc66;">&#40;</span> icon, tickerText, when<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AContext+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Context</span></a> context = getApplicationContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        CharSequence contentTitle = <span style="color: #ff0000;">&quot;My notification&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        CharSequence contentText = <span style="color: #ff0000;">&quot;Hello World!&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        Intent notificationIntent =</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, NotificationExperimentIntent.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        PendingIntent contentIntent =</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            PendingIntent.<span style="color: #006600;">getActivity</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #cc66cc;">0</span>, notificationIntent, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        notification.<span style="color: #006600;">setLatestEventInfo</span><span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            context,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            contentTitle,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            contentText,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            contentIntent<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #808080; font-style: italic;">//  Send the notification</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        nm.<span style="color: #006600;">notify</span><span style="color: #66cc66;">&#40;</span> HELLO_ID, notification <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>The Android developer documentation goes through all of this in detail <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">here</a>.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/648"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/648/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Application Updater</title>
		<link>http://labs.distriqt.com/post/594</link>
		<comments>http://labs.distriqt.com/post/594#comments</comments>
		<pubDate>Tue, 21 Jun 2011 00:54:18 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=594</guid>
		<description><![CDATA[So I went to update all my CS5.5 last night and ended up spending hours trying to get the application manager to actually allow me to update. I kept getting an error saying "You are already running the Adobe Application Manager. Please close all instances of Adobe Application Manager in order to continue with this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F594"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F594&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>So I went to update all my CS5.5 last night and ended up spending hours trying to get the application manager to actually allow me to update. I kept getting an error saying <em>"You are already running the Adobe Application Manager. Please close all instances of Adobe Application Manager in order to continue with this installation."</em></p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/adobe_manager_fail.jpg" rel="shadowbox[sbpost-594];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/adobe_manager_fail-580x395.jpg" alt="" title="adobe_manager_fail" width="580" height="395" class="aligncenter size-medium wp-image-601" /></a></p>
<p>Now I had been getting this error for a while, on two (OSX) machines so I decided that enough was enough and needed to get this running. I knew I only had one instance running, I had checked <code>top</code> multiple times to confirm this. So after much research I figured out that it was simply a permissions problem, so who better to alleviate a permissions problem than my good friend <code>sudo</code>.</p>
<p><code>sudo /Library/Application\ Support/Adobe/OOBE/PDApp/core/Adobe\ Application\ Manager.app/Contents/MacOS/PDApp<br />
</code></p>
<p>And that was it! The Application Manager ran without that annoying message.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/594"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/594/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KML Loader Update</title>
		<link>http://labs.distriqt.com/post/577</link>
		<comments>http://labs.distriqt.com/post/577#comments</comments>
		<pubDate>Sun, 19 Jun 2011 11:53:42 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=577</guid>
		<description><![CDATA[So as many people know, I've been promising an update to the KML Loader for a while now, and even to the point where I've had some local revisions and haven't had the time to check them in (I know, I know, bad practice!) The major update has been to enable the ability to load [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F577"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F577&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>So as many people know, I've been promising an update to the KML Loader for a while now, and even to the point where I've had some local revisions and haven't had the time to check them in (I know, I know, bad practice!)</p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/kmlloader_groundoverlay.png" rel="shadowbox[sbpost-577];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/kmlloader_groundoverlay.png" alt="" title="KML Loader showing a Ground Overlay" width="580" height="352" class="aligncenter size-full wp-image-580" /></a></p>
<p>The major update has been to enable the ability to load linked assets. Initially this just extends to ground overlays and custom icons, but now that I have the structure setup to do this I'll be able to add in linked files and styles easily. </p>
<p><span id="more-577"></span></p>
<p>Other updates include a series of bug fixes, features with multiple geometries now load in correctly and I've updated the utility library to correctly parse the newer OGC KML namespace.</p>
<p>Some things to note:</p>
<ul>
<li>I've added a trunk directory to keep the main head revision separate from the tag tree</li>
<li>I've removed the included version of the google maps utility library. I've committed in some changes to this library so I didn't want to have to maintain it in two places, so you'll now have to go to the google maps utility library on google code <a href="http://code.google.com/p/gmaps-utility-library-flash/" target="_blank">here</a> (I'll package it all up at the end of this post as well).</li>
<li>I've tagged the previous version of the library if you wish to keep using it, you'll find it at: <code>http://svn.distriqt.com/public/trunk/gmaps/tags/R20101004_gmaps_utils_v1.0</code></li>
<li>I've used the <a href="https://github.com/arthur-debert/BulkLoader" target="_blank">BulkLoader</a> by Arthur Debert and have included it in the repository. This is used to load all the linked assets.</li>
</ul>
<p>The functionality should be exactly the same as the previous version, so you can still refer to the post on <a href="http://labs.distriqt.com/post/421">interactions</a>, about the <a href="http://labs.distriqt.com/post/251">SimpleKMLLoader</a> and the initial post about the <a href="http://labs.distriqt.com/post/164">KmlLoader</a>. </p>
<p>The major change is that you now need to grab the gmaps utility library separately and put both libraries in your source tree. </p>
<p>
<pre>
svn co http://svn.distriqt.com/public/trunk/gmaps/trunk/ distriqt-gmaps
svn co http://gmaps-utility-library-flash.googlecode.com/svn/trunk/ gmaps-utility-library-flash-read-only
</pre>
</p>
<p>You'll end up with a src directory in both of these checkouts that you need to add to your source path for your projects.</p>
<p>Here are the current packages (v1.2) <a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/distriqt-gmaps-kmlloader.zip'>distriqt-gmaps-kmlloader-v1.2</a> and <a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/google-utility-library-flash.zip'>google-utility-library-flash</a>.</p>
<p>Let me know if you find it useful!</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/577"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/577/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find your iOS UDID</title>
		<link>http://labs.distriqt.com/post/522</link>
		<comments>http://labs.distriqt.com/post/522#comments</comments>
		<pubDate>Sun, 08 May 2011 11:11:24 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=522</guid>
		<description><![CDATA[This is just a quick post on how to retrieve your iPhone/iPad/iPod UUID (Unique Device Identifier). We use this UUID to allow your phone to use development versions of our applications. There are several ways to do this but the simplest is using Apple's flagship tool, iTunes. Open up iTunes and plug in your device [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F522"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F522&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is just a quick post on how to retrieve your iPhone/iPad/iPod UUID  (Unique Device Identifier).</p>
<p>We use this UUID to allow your phone to use development versions of our applications. </p>
<p>There are several ways to do this but the simplest is using Apple's flagship tool, iTunes. </p>
<ul>
<li>Open up iTunes and plug in your device</li>
<li>Select your device in the "DEVICES" list</li>
<li>Select the Summary tab and you should see the Serial Number as in the screen shot below:</li>
</ul>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/05/iphone-uuid-1.jpg" alt="" title="iphone-uuid-1" width="580" height="158" class="aligncenter size-full wp-image-565" /></p>
<ul>
<li>Click on the Serial Number label and it should change to reveal the UDID:</li>
</ul>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/05/iphone-uuid-2.jpg" alt="" title="iphone-uuid-2" width="580" height="157" class="aligncenter size-full wp-image-566" /></p>
<ul>
<li>You can then either just hit Ctrl/Command-C, or go to Edit / Copy to copy the UDID to the clipboard</li>
</ul>
<p>You should then be able to paste it into an email etc so we can add your device into our allowed development device list.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/522"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/522/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse (FlashBuilder) Keyboard Shortcuts</title>
		<link>http://labs.distriqt.com/post/455</link>
		<comments>http://labs.distriqt.com/post/455#comments</comments>
		<pubDate>Fri, 15 Apr 2011 01:00:56 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[shortcuts]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=455</guid>
		<description><![CDATA[Just assembling a quick list of some of the shortcuts I use everyday in Eclipse. Let me know if you have any other favourites! Code hinting: Ctrl + Space Change view: Cmd + 3 Open any file quickly without browsing for it in the Package Explorer: Cmd + Shift + R Open a type (e.g.: [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F455"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F455&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Just assembling a quick list of some of the shortcuts I use everyday in Eclipse. Let me know if you have any other favourites!</p>
<ul>
<li>Code hinting: <strong>Ctrl + Space</strong></li>
<li>Change view: <strong>Cmd + 3</strong></li>
<li>Open any file quickly without browsing for it in the Package Explorer: <strong>Cmd + Shift + R</strong></li>
<li>Open a type (e.g.: a class, an interface) without clicking through interminable list of packages: <strong>Cmd + Shift + T</strong></li>
<li>Go directly to a member (method, variable) of a huge class file, especially when a lot of methods are named similarly: <strong>Cmd + O</strong></li>
<p><!--</p>
<li>Jump from one member to the next (or previous), you can use <strong>Ctrl + Shift + ↓</strong> or <strong>Ctrl + Shift + ↑</strong>, respectively</li>
<p>--></p>
<li>Go to line number N in the source file: <strong>Cmd + L, enter line number</strong></li>
<li>Go to other open editors: <strong>Cmd + E</strong></li>
<li>Go to a type declaration: <strong>F3</strong> or <strong>Cmd + click on declaration</strong></li>
</ul>
<p>Note: Cmd == Ctrl on Windows/Linux</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/455"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/455/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming Webcam To a Ubuntu Red5 Server</title>
		<link>http://labs.distriqt.com/post/493</link>
		<comments>http://labs.distriqt.com/post/493#comments</comments>
		<pubDate>Thu, 24 Mar 2011 00:05:44 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[red5]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=493</guid>
		<description><![CDATA[For an upcoming project we needed to stream content from the user's webcam to be recorded on the server. In theory this sounded like a basic operation, having used FMS to this end before, but actually installing and setting up the Red5 server proved to be a little tricky. So I just wanted to outline [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F493"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F493&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>For an upcoming project we needed to stream content from the user's webcam to be recorded on the server. In theory this sounded like a basic operation, having used FMS to this end before, but actually installing and setting up the Red5 server proved to be a little tricky. So I just wanted to outline the process I went through to get a Red5 Server running on ubuntu and how to setup your first recording stream.</p>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/03/Red5.png" alt="" title="Red5" width="425" height="169" class="aligncenter size-full wp-image-494" /></p>
<blockquote><p><a href="http://www.red5.org">Red5</a> is a powerful Java based video streaming and multi-user solution for the Flash Player. Red5 includes support for the latest multi-user API’s including NetConnection, NetStream and SharedObject’s while providing a powerful RTMP / Servlet implementation. It is basically an open source Flash Media Server. </p></blockquote>
<p>We're going to go through two major steps here, firstly installing Red5 on Ubuntu and then building a simple application to record the webcam.<br />
<span id="more-493"></span></p>
<p><strong>Installing Red5</strong></p>
<p>For this installation we're going to use a stock Ubuntu Server installation (8.04 Hardy Heron). We installed LAMP as well for the project but it's not required for Red5. Firstly we need to install a few dependencies including the Java runtime environment and the Java development kit (and yes these are terminal commands so get it up and running):</p>
<p><code>sudo apt-get install java-package sun-java6-jdk sun-java6-jre<br />
sudo apt-get install subversion ant</code></p>
<p>Next we need to grab the code base for Red5. We tried the trunk version first but had some issues with it (as you'd expect from a HEAD revision) so ended up using v0.9.1. You can try other versions of the server by browsing the <a href="http://red5.googlecode.com/svn/java/server/tags/">repository</a> and replacing the reference in the svn checkout below:</p>
<p><code>svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1/ ~/red5</code></p>
<p>Now we build using Ant:</p>
<p><code>export JAVA_HOME=/usr/lib/jvm/java-6-sun<br />
export ANT_HOME=/usr/share/ant/<br />
cd ~/red5<br />
/usr/share/ant/bin/ant</code></p>
<p>Make sure there were no errors during the build. If there were consult the red5 wiki for help. Install:</p>
<p><code>sudo mkdir /usr/share/red5<br />
sudo cp -R ~/red5/dist/* /usr/share/red5/.<br />
sudo chmod 755 /usr/share/red5/red5.sh</code></p>
<p>Start the Red5 server:</p>
<p><code>export RED5_HOME=/usr/share/red5<br />
/usr/share/red5/red5.sh</code></p>
<p>Next we need to create the startup script. This script will allow you to get the server starting on reboot etc. Put the following text into the file <code>/etc/init.d/red5</code> and make the file executable <code>sudo chmod 755 /etc/init.d/red5</code>. </p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/sh</span>
<span style="color: #808080; font-style: italic;"># init script <span style="color: #000000; font-weight: bold;">for</span> Red5</span>
<span style="color: #808080; font-style: italic;"># /etc/init.d/red5</span>
&nbsp;
<span style="color: #007800;">RED5_USER=</span>root
<span style="color: #007800;">RED5_HOME=</span>/usr/share/red5
<span style="color: #007800;">RED5_PROG=</span>red5
&nbsp;
<span style="color: #7a0874; font-weight: bold;">test</span> -x <span style="color: #007800;">$RED5_HOME</span>/<span style="color: #007800;">$RED5_PROG</span>.<span style="color: #c20cb9; font-weight: bold;">sh</span> || <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">5</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
     start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
         <span style="color: #7a0874; font-weight: bold;">echo</span> -n <span style="color: #ff0000;">&quot;Starting Red5&quot;</span>
         <span style="color: #7a0874; font-weight: bold;">echo</span> -n <span style="color: #ff0000;">&quot; &quot;</span>
         <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$RED5_HOME</span>
         <span style="color: #c20cb9; font-weight: bold;">su</span> -s /bin/bash -c <span style="color: #ff0000;">&quot;$RED5_HOME/$RED5_PROG.sh &amp;&quot;</span> <span style="color: #007800;">$RED5_USER</span>
         <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">2</span>
         ;;
     stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
         <span style="color: #7a0874; font-weight: bold;">echo</span> -n <span style="color: #ff0000;">&quot;Shutting down Red5&quot;</span>
         <span style="color: #7a0874; font-weight: bold;">echo</span> -n <span style="color: #ff0000;">&quot; &quot;</span>
         <span style="color: #c20cb9; font-weight: bold;">su</span> -s /bin/bash -c <span style="color: #ff0000;">&quot;killall -q -u $RED5_USER java&quot;</span> <span style="color: #007800;">$RED5_USER</span>
         <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">2</span>
         ;;
     restart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
         $<span style="color: #000000;">0</span> stop
         $<span style="color: #000000;">0</span> start
         ;;
<span style="color: #000000; font-weight: bold;">esac</span></pre>
<p><br/><br />
Now you can start/stop/restart from the command line by using:<br />
<code>sudo /etc/init.d/red5 [start/stop/restart]</code></p>
<p>Lastly once you've got the server running, you can browse to the test page on your server <a href="http://localhost:5080">http://localhost:5080</a> and you should see:</p>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/03/red5-test-screen.png" alt="" title="red5-test-screen" width="580" height="390" class="aligncenter size-full wp-image-502" /></p>
<p>If you can't see this it and you've confirmed the Red5 server is running it could be a firewall issue. You may need to alter the IPTables on your machine but that's not going to be covered here.</p>
<p>Lastly we need to install the actual streaming application on our Red5 Server. Navigate to <a href="http://localhost:5080/installer/">http://localhost:5080/installer/</a>, select the oflaDemo and click Install.<br />
To test it installed correctly, navigate to <a href="http://localhost:5080/demos/ofla_demo.html">http://localhost:5080/demos/ofla_demo.html</a> (correct the server name in the top right) and hit connect. You should see a list of available videos and a green light in the top right.</p>
<p>Congratulations you're all up and running with a Red5 Server!</p>
<hr/>
<br/><br />
<strong>Sample Application</strong></p>
<p>The following class shows a very simple example of starting a streaming feed to the server and then streaming the same data back from the server into a Video object on the stage.</p>
<p>The fundamentals are very simple:</p>
<ul>
<li>Create a NetConnection object and connect to the server</li>
<li>Create a NetStream when the connection succeeds and publish the camera feed to the stream as a "record" type</li>
</ul>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #0066CC;">NetConnection</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #0066CC;">NetStream</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">NetStatusEvent</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Camera</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Video</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Red5Experiment <span style="color: #0066CC;">extends</span> Sprite</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//	Constants</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const RED5_URL	: <span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;rtmp://SERVERNAME/oflaDemo/test/&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//	Variables</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _netConnection	: <span style="color: #0066CC;">NetConnection</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _netStream		: <span style="color: #0066CC;">NetStream</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _recvStream		: <span style="color: #0066CC;">NetStream</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_url</span>		: <span style="color: #0066CC;">String</span> = RED5_URL;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _filename		: <span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;test-red5&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _video		: <span style="color: #0066CC;">Video</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Red5Experiment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netConnection = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netConnection.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">_url</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netConnection.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> NetStatusEvent.<span style="color: #006600;">NET_STATUS</span>, netStatusHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_video = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Video</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			addChild<span style="color: #66cc66;">&#40;</span> _video <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">////////////////////////////////////////////////////////</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//	FUNCTIONALITY</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//	Setup the camera</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #000000; font-weight: bold;">var</span> cam:<span style="color: #0066CC;">Camera</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #006600;">getCamera</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			cam.<span style="color: #006600;">setLoopback</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			cam.<span style="color: #0066CC;">setMode</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">176</span>,<span style="color: #cc66cc;">144</span>,<span style="color: #cc66cc;">15</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			cam.<span style="color: #006600;">setKeyFrameInterval</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			cam.<span style="color: #0066CC;">setQuality</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">70</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//	Start publishing the video stream</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netStream = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span>_netConnection<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netStream.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> NetStatusEvent.<span style="color: #006600;">NET_STATUS</span>, netStatusHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netStream.<span style="color: #006600;">attachCamera</span><span style="color: #66cc66;">&#40;</span> cam <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_netStream.<span style="color: #006600;">publish</span><span style="color: #66cc66;">&#40;</span>_filename, <span style="color: #ff0000;">&quot;record&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//	Grab live stream back from server</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_recvStream = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetStream</span><span style="color: #66cc66;">&#40;</span>_netConnection<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_recvStream.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>_filename<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			_video.<span style="color: #006600;">attachNetStream</span><span style="color: #66cc66;">&#40;</span>_recvStream<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//	Alternatively, Use the local camera feed</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//			_video.attachCamera(cam);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">////////////////////////////////////////////////////////</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//	EVENT HANDLERS</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">//</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> netStatusHandler<span style="color: #66cc66;">&#40;</span> event:NetStatusEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Red5Experiment::netStatusHandler():&quot;</span>+event.<span style="color: #006600;">info</span>.<span style="color: #006600;">code</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span> event.<span style="color: #006600;">info</span>.<span style="color: #006600;">code</span> <span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;NetConnection.Connect.Success&quot;</span>:</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #b1b100;">break</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p>The files are recorded to a directory within the webapps folder on your server. If you've followed the paths above you'll find the file <code>/usr/share/red5/webapps/oflaDemo/streams/test/test-red5.flv</code> on your server.</p>
<p>You now should have a complete streaming / recording media setup. All running off an open source server! </p>
<hr/>
<p>EDIT: I've created a zip of the sample application files: <a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2011/05/red5_sampleapplication.zip'>red5_sampleapplication</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/493"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/493/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>KML Interactions</title>
		<link>http://labs.distriqt.com/post/421</link>
		<comments>http://labs.distriqt.com/post/421#comments</comments>
		<pubDate>Mon, 04 Oct 2010 11:49:09 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[interaction]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=421</guid>
		<description><![CDATA[I've had a few requests asking about how to interact with the KML once you've loaded it onto the map. It's really quite an easy step once you've got the KML on there but I'll show you how in this simple example. Firstly if you haven't read the Simple KML Loader post then head over [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F421"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F421&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've had a few requests asking about how to interact with the KML once you've loaded it onto the map. It's really quite an easy step once you've got the KML on there but I'll show you how in this simple example.</p>
<p><a href="http://labs.distriqt.com/examples/kmlloader/index.html" rel="shadowbox"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2010/10/kml-interaction-example-580x332.png" alt="KML Interaction Example" title="KML Interaction Example" width="580" height="332" class="aligncenter size-medium wp-image-422" /></a><br />
<span id="more-421"></span><br />
Firstly if you haven't read the <a href="http://labs.distriqt.com/post/251">Simple KML Loader</a> post then head over there first. It explains how to get that KML file loaded and displayed on your map.</p>
<p>The objective of this simple example is to show an info window popup when we rollover one of the objects in the kml, showing the name of the kml object in the window.</p>
<p>The code for this example is in our svn:</p>
<p><code>svn co http://svn.distriqt.com/public/trunk/gmaps/examples/kmlloader/</code></p>
<p>Make sure you have our SimpleKmlLoader library in your project.</p>
<p>To create the loader, load the kml and have it added to your map:</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> _loader:SimpleKmlLoader = <span style="color: #000000; font-weight: bold;">new</span> SimpleKmlLoader<span style="color: #66cc66;">&#40;</span> _map, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, loader_completeHandler <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> _file <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Now on the complete handler you can add the interactions:</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> loader_completeHandler<span style="color: #66cc66;">&#40;</span> _event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// At this point generally this objects array</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//   will simply be the base object of the KML</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	addInteraction<span style="color: #66cc66;">&#40;</span> _loader.<span style="color: #006600;">objects</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;* Add interaction to every object in the array</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;*/</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> addInteraction<span style="color: #66cc66;">&#40;</span> _objects:<span style="color: #0066CC;">Array</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject <span style="color: #b1b100;">in</span> _objects<span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">interactive</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapMouseEvent.<span style="color: #006600;">ROLL_OVER</span>, object_rollOverHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapMouseEvent.<span style="color: #006600;">ROLL_OUT</span>, object_rollOutHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">// Process any children</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		addInteraction<span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">children</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> object_rollOverHandler<span style="color: #66cc66;">&#40;</span> _event:MapMouseEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// show an info panel...</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject = KmlDisplayObject<span style="color: #66cc66;">&#40;</span>_event.<span style="color: #006600;">currentTarget</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	_map.<span style="color: #006600;">openInfoWindow</span><span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">latLng</span>, <span style="color: #000000; font-weight: bold;">new</span> InfoWindowOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>content:_object.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> object_rollOutHandler<span style="color: #66cc66;">&#40;</span> _event:MapMouseEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	_map.<span style="color: #006600;">closeInfoWindow</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p>Now when you run with this code you should see the name of the kml object appear in the info window when you rollover the object. This is of course a very simple example, and much more can be done with this, but it is a good point to introduce the concept of interactions.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/421"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/421/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

