<?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>labs.ghostinteractive.net</title>
	<atom:link href="http://labs.ghostinteractive.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.ghostinteractive.net</link>
	<description>A hub for the experiments, hacks and open source ventures of Ghost Interactive</description>
	<lastBuildDate>Wed, 10 Feb 2010 19:14:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>processing.video on OSX 10.6 with Eclipse</title>
		<link>http://labs.ghostinteractive.net/processing-video-on-osx-10-6-with-eclipse/</link>
		<comments>http://labs.ghostinteractive.net/processing-video-on-osx-10-6-with-eclipse/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:52:28 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://labs.ghostinteractive.net/?p=664</guid>
		<description><![CDATA[Using the <code>processing.video.*</code> package w/ Eclipse on w/ Snow Leopard requires a couple of extra steps to make things run smoothly. The following will explain how to go about making it work. ]]></description>
			<content:encoded><![CDATA[<p>Using the <code>processing.video.*</code> package w/ Eclipse on w/ Snow Leopard requires a couple of extra steps to make things run smoothly. The following will explain how to go about making it work. This post does not cover how to create a Processing project in Eclipse. If you are looking for that info go here: <a href="http://processing.org/learning/tutorials/eclipse/">http://processing.org/learning/tutorials/eclipse/</a></p>
<p>The first step is to link the Processing <code>video.jar</code> file to your project. The following outlines how to go about it (assuming you&#8217;ve already created your project).</p>
<ol>
<li>Navigate to <em>/Application/Processing/</em></li>
<li>Right click the Processing icon and choose <strong>Show Package Contents</strong> (opens new Finder window)</li>
<li>Navigate to <em>Resources/Java/libraries/video/library/</em></li>
<li>Copy the file called <code>video.jar</code></li>
<li>Navigate to your Processing project</li>
<li>Create a folder called <em>lib</em> (can be called anything you want) and paste the <code>video.jar</code> file there</li>
<li>Back in Eclipse, right click your project file and choose <strong>Properties</strong></li>
<li>From the list on the left choose <strong>Java Build Path</strong></li>
<li>Click the <strong>Libraries</strong> tab</li>
<li>Click the <strong>Add JARs&#8230;</strong> button</li>
<li>Navigate to the <em>lib</em> folder where you pasted the <code>video.jar</code> file</li>
<li>Select the <code>video.jar</code> file and press <strong>OK</strong></li>
</ol>
<div id="attachment_665" class="wp-caption alignnone" style="width: 600px"><a href="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/add_jar.jpg"><img src="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/add_jar.jpg" alt="Java Build Path Dialog" title="add_jar" width="590" height="421" class="size-full wp-image-665" /></a><p class="wp-caption-text">Project Preferences: Java Build Path Dialog</p></div>
<div id="attachment_668" class="wp-caption alignnone" style="width: 407px"><a href="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/select_jar.jpg"><img src="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/select_jar.jpg" alt="Select JAR Dialog" title="select_jar" width="397" height="416" class="size-full wp-image-668" /></a><p class="wp-caption-text">Select JAR Dialog</p></div>
<p>This should enable you to import the video package into your project. Now&#8230; if you are running Snow Leopard there is another step that you need to follow otherwise when you try to instantiate either a <code>Capture</code> or <code>MovieMaker</code> object your app will crash w/ an error containing the following message:</p>
<p><em>Caused by: java.lang.UnsatisfiedLinkError: /System/Library/Java/Extensions/libQTJNative.jnilib:  no suitable image found. Did find: /System/Library/Java/Extensions/libQTJNative.jnilib: no matching architecture in universal wrapper</em></p>
<p>The reason you are seeing this error is that the Java install shipped w/ Snow Leopard will, by default, open a 64-bit version of the JVM and the <code>processing.video.*</code> package has some dependencies on the 32-bit JVM. I am not clear on the details of the dependency but it is clear that this crash is due to a difference between the JVMs.</p>
<p>Here are the steps to fixing this problem:</p>
<ol>
<li>Right click your project file and choose <strong>Properties</strong></li>
<li>Choose <strong>Run/Debug Settings</strong> from the list on the left</li>
<li>There should be at least one build configuration in the launch configurations list, choose it and click the <strong>Edit</strong> button</li>
<li>Click the <strong>Arguments</strong> tab</li>
<li>In the <em>VM arguments</em> field and this<code>-d32</code> and click the <strong>OK</strong> button</li>
</ol>
<div id="attachment_667" class="wp-caption alignnone" style="width: 600px"><a href="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/run_settings.jpg"><img src="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/run_settings.jpg" alt="Run/Debug Settings Dialog" title="run_settings" width="590" height="499" class="size-full wp-image-667" /></a><p class="wp-caption-text">Project Preferences: Run/Debug Settings Dialog</p></div>
<div id="attachment_666" class="wp-caption alignnone" style="width: 600px"><a href="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/args.jpg"><img src="http://labs.ghostinteractive.net/wp-content/uploads/2010/02/args.jpg" alt="Edit Run Configuration Dialog" title="args" width="590" height="471" class="size-full wp-image-666" /></a><p class="wp-caption-text">Edit Run Configuration Dialog w/ Arguments</p></div>
<p>Now that you have included this argument Java will open your app in a 32-bit version of the virtual machine without problems. I&#8217;m sure there is a way to make this the default behavior for Java applications, but because this problem is specific to Processing I prefer to just set the preferences on a per project basis.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.ghostinteractive.net/processing-video-on-osx-10-6-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AudioSpot Addition To Overlay Extension</title>
		<link>http://labs.ghostinteractive.net/audiospots/</link>
		<comments>http://labs.ghostinteractive.net/audiospots/#comments</comments>
		<pubDate>Fri, 08 May 2009 04:12:34 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[openzoom]]></category>
		<category><![CDATA[overlay]]></category>

		<guid isPermaLink="false">http://ghostinteractive.net/blog/?p=520</guid>
		<description><![CDATA[A new set of classes for the Overlay Extension have been completed. The new code allows regions of a zoom image to be accompanied by audio ( read: music, narration, sound fx ). A region is defined as either radial or rectangular and within a zoom range. The demo below demonstrates the basic concept. Note: [...]]]></description>
			<content:encoded><![CDATA[<p>A new set of classes for the Overlay Extension have been completed. The new code allows regions of a zoom image to be accompanied by audio ( read: music, narration, sound fx ). A region is defined as either radial or rectangular and within a zoom range. The demo below demonstrates the basic concept. Note: The blue circle is only an indicator of the AudioSpot, actual implementation does not add a visual element.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_audiospots_151116640"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="http://labs.ghostinteractive.net/overlays/audiospots/audiospots.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://labs.ghostinteractive.net/overlays/audiospots/audiospots.swf"
			name="fm_audiospots_151116640"
			width="400"
			height="300">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><em>AudioSpot coordinates: x:230, y:175, z-range:2-5<br />
Keyboard Controls: i: zoom in, o: zoom out, a: pan left, s: pan down, d: pan right, w: pan up</em></p>
<p><strong><a href="http://ghostinteractive.googlecode.com/files/audiospots_basics_CS3_2009_05_07.zip">Download Source Code:  audiospots_basics_CS3_2009_05_07.zip</a></strong></p>
<p>When the blue circle in the image is moved to the center of the viewport and the zoom depth is between 2 and 5 audio begins. Once the circle is either moved away from the center or the image is zoomed beyond the given range the audio fades away.</p>
<p>In keeping with the overall design of the overlay extension this addition consists of a &#8220;layer&#8221; ( AudioLayer ) that listens for events from the zoom image and manages the AudioSpot object(s). It&#8217;s interface is consistent with the HotspotLayer in that there are methods for adding and removing AudioSpot objects. Like Hotspots, all coordinates are relative to the original size of the image.</p>
<p>To accomplish bounds checking each AudioSpot in a layer contains a ProximityGate object. The gate opens and closes based on the distance between the point in the image currently at the center of the viewport and a given point. As mentioned the proximity gate can define either a radial or rectangular region. The ProximityGate classes ( RadialGate &#038; RectangularGate ) are abstracted from the AudioSpot code. This means that can be used in other situations where some functionality needs to be invoked based on proximity.</p>
<p>I&#8217;m looking forward to implementing the audio classes as ambient accompaniment to large zoomable collages. I&#8217;m also quite excited to see what others come up with. If you find these classes useful and end up using them in a project let me know! I&#8217;m amped to see what people come up with. If you have thoughts on improvements or find bugs don&#8217;t hesitate to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.ghostinteractive.net/audiospots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Overlay Example Code Available</title>
		<link>http://labs.ghostinteractive.net/more-overlay-examples/</link>
		<comments>http://labs.ghostinteractive.net/more-overlay-examples/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 02:17:27 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[openzoom]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://ghostinteractive.net/blog/?p=400</guid>
		<description><![CDATA[A couple of new overlay code examples have been added to our Google Code repository. These examples are very stripped down]]></description>
			<content:encoded><![CDATA[<p>A couple of new overlay code examples have been added to our Google Code repository. These examples are very stripped down versions of the more detailed demos originally released. They can be compiled directly from Flash CS3 or CS4.</p>
<p><strong>Click the blue hotspots to pan and zoom:</strong><br/><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_hotspots_1598938712"
			class="flashmovie"
			width="550"
			height="270">
	<param name="movie" value="http://labs.ghostinteractive.net/overlays/basics/hotspots.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://labs.ghostinteractive.net/overlays/basics/hotspots.swf"
			name="fm_hotspots_1598938712"
			width="550"
			height="270">
	<!--<![endif]-->
		<br />

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<br/><br />
<strong>Dowload Here:</strong> <a href="http://ghostinteractive.googlecode.com/files/overlays_basics_CS3_2009_04_15.zip">overlays_basics_CS3_2009_04_15.zip </a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.ghostinteractive.net/more-overlay-examples/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Overlay Extension For OpenZoom SKD Released</title>
		<link>http://labs.ghostinteractive.net/overlay-extension-released/</link>
		<comments>http://labs.ghostinteractive.net/overlay-extension-released/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 02:30:55 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionsScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[openzoom]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://ghostinteractive.wordpress.com/?p=334</guid>
		<description><![CDATA[The Overlay Extension for the OpenZoom SDK is light-weight set of Actionscript 3 classes that provide mapping-like functionality for use with the OpenZoom ZUI ( zoomable user interace) framework. These classes provide functionality for adding &#8220;hotspots&#8221; and &#8220;point to point paths&#8221; to the Open Zoom MultiScaleImage component. These classes use standard x &#38; y coordinates [...]]]></description>
			<content:encoded><![CDATA[<p>The Overlay Extension for the OpenZoom SDK is light-weight set of Actionscript 3 classes that provide mapping-like functionality for use with the <a href="http://openzoom.org/">OpenZoom ZUI ( zoomable user interace) framework</a>. These classes provide functionality for adding &#8220;hotspots&#8221; and &#8220;point to point paths&#8221; to the Open Zoom MultiScaleImage component. These classes use standard x &amp; y coordinates relative to the original size of the source image to plot points of interest and paths over a zoomable image.</p>
<p><a href="http://labs.ghostinteractive.net/overlays/hotspots/" target="_blank"><strong>Hotspot Examples</strong><br />
<a href="http://labs.ghostinteractive.net/overlays/polylines/" target="_blank"><strong>Polyline Example</strong></a></p>
<h3>Download Source Code And Examples:</h3>
<p><a title="Ghost Interactive Google Code Project" href="http://code.google.com/p/ghostinteractive/" target="_blank">http://code.google.com/p/ghostinteractive/</a></p>
<h3>Overlays</h3>
<p>I have been using the term &#8220;overlay&#8221; as a catch-all for the different types of visual elements I&#8217;ve been working on. Currently there are two types of overlay classes:</p>
<p><strong>Hotspot:</strong><br />
This element is meant to be used as a base class for &#8220;marker&#8221; elements. These are typically clickable points of interest which when clicked pan, zoom or pan and zoom the image to a specific position and/or depth.</p>
<p><strong>PolylineSegment:</strong><br />
This element uses the flash.display.Graphics class to draw paths around a zoom image. The paths can be used for a number of things including map routes, path based navigation, relational links( think node based graphical displays ), etc&#8230; Each connecting line can have unique attributes such as color, thickness, alpha, caps style and others properties related to the Graphics line-style.</p>
<h3>Layers</h3>
<p>To display the different types of &#8220;overlays&#8221; each type is managed by a unique &#8220;layer&#8221; class. This is somewhat of a departure from typical mapping software models. Most mapping software implements a single overlay layer to which any type of overlay can be added. As we add classes to the overlays package we may adopt a similar system but for now we are more interested in a lean implementation than the overhead of unneeded abstraction. Below is a short description of each layer type.</p>
<p><strong>HotspotLayer:</strong><br />
The HotspotLayer manages the positions, depths and visibility of Hotspot sub-classes. It also provides the functionality for zooming and panning to specific points within the image.</p>
<p><strong>PolylineLayer:</strong><br />
This layer contains a list of PolylineSegment sub-classes and draws them. Each time the zoom image pans or zooms the layer redraws the shapes relative in size and position to the original image size.</p>
<p><strong>Simplified code example:</strong></p>
<pre name="code" class="java">var msImage:MultiScaleImage = new MultiScaleImage();
var hsLayer:HotspotLayer = new HotspotLayer( msImage );
var plLayer:PolylineLayer = new PolylineLayer( msImage );

hsLayer.addHotspot( new CustomHotspot( params:Object ) );

plLayer.addSegment( new PolylineSegment( new Point( 1200, 300 ) );

addChild( msImage );
addChild( hsLayer );
addChild( plLayer );</pre>
<p>Download the examples for complete code and further explanation. If you happen to find these classes useful or have suggestions for additions and/or changes leave a comment and let me here about it. If you would like to contribute to the project drop a line at ghostinteractive@gmail.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.ghostinteractive.net/overlay-extension-released/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Strip Whitespace From String ActionScript 3.0</title>
		<link>http://labs.ghostinteractive.net/strip-whitespace/</link>
		<comments>http://labs.ghostinteractive.net/strip-whitespace/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 23:01:11 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[whitespace]]></category>

		<guid isPermaLink="false">http://ghostinteractive.wordpress.com/?p=341</guid>
		<description><![CDATA[Just came up with this simple method for removing extra whitespace from a string using regular expressions and the String.replace() method. Many examples found on the web involve looping through the entire string and evaluating individual characters which can be an expensive operation. Using regular expressions, as shown below, can definitely save some keystrokes and [...]]]></description>
			<content:encoded><![CDATA[<p>Just came up with this simple method for removing extra whitespace from a string using regular expressions and the String.replace() method. Many examples found on the web involve looping through the entire string and evaluating individual characters which can be an expensive operation. Using regular expressions, as shown below, can definitely save some keystrokes and processing.</p>
<pre name="code" class="java">
// -- String with tab, multiple spaces and newline char
var testString:String = 'here is a tabthere are six spaces      here is a new linennext line';

// -- Test expression
var whitespace:RegExp = /(\t|\n|\s{2,})/g;

trace( 'testString pre-replace: ' + testString );

// -- Re-assign the value of testString to the result of replace() mehtod
testString = testString.replace( whitespace, ' ' );

trace( 'testString post-replace: ' + testString )
</pre>
<p>The replace() method turns all multiple spaces, tabs and newline characters into single spaces.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.ghostinteractive.net/strip-whitespace/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
