<?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 &#187; ActionScript</title>
	<atom:link href="http://labs.ghostinteractive.net/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.ghostinteractive.net</link>
	<description>This site is currently inactive. Support for the Overlay Extension for OpenZoom will be provided. Feel free to leave questions or comments and I&#039;ll try to get back to you prompty</description>
	<lastBuildDate>Fri, 12 Mar 2010 04:20:13 +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>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_14157228"
			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_14157228"
			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_357897722"
			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_357897722"
			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>27</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>
