<?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>Mike Richards Photography Blog &#187; flash gallery</title>
	<atom:link href="http://www.mikerichardsphotography.com/blog/tag/flash-gallery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikerichardsphotography.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 17:18:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How To: SimpleViewer 2 and SWFAddress.</title>
		<link>http://www.mikerichardsphotography.com/blog/2010/01/28/how-to-simpleviewer-2-and-swfaddress/</link>
		<comments>http://www.mikerichardsphotography.com/blog/2010/01/28/how-to-simpleviewer-2-and-swfaddress/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:07:54 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[deep linking]]></category>
		<category><![CDATA[deeplinking]]></category>
		<category><![CDATA[flash gallery]]></category>
		<category><![CDATA[simpleviewer]]></category>
		<category><![CDATA[swfaddress]]></category>

		<guid isPermaLink="false">http://www.mikerichardsphotography.com/blog/?p=91</guid>
		<description><![CDATA[As this is an update to an existing post I will dispense with a basic introduction. The major difference between this post and the previous is that the new version uses Actionscript 3. Here is the deep linking example of SimpleViewer 2 and SWFAddress 2.4. What you will need to download: SimpleViewer Pro 2.0.1 SWFAddress [...]]]></description>
			<content:encoded><![CDATA[<p>As this is an update to an <a href="http://www.mikerichardsphotography.com/blog/2009/05/15/how-to-adding-swfaddress-to-simpleviewer/">existing post</a> I will dispense with a basic introduction. The major difference between this post and the previous is that the new version uses Actionscript 3. Here is the deep linking <a href="http://www.mikerichardsphotography.com/example/SV2withSWFAddress/">example of SimpleViewer 2 and SWFAddress 2.4</a>.</p>
<p>What you will need to download:</p>
<ul>
<li><a href="http://www.simpleviewer.net/simpleviewer/pro/">SimpleViewer Pro 2.0.1</a></li>
<li><a href="http://www.asual.com/download/swfaddress">SWFAddress 2.4</a></li>
<li>If you don&#8217;t have it <a href="http://www.adobe.com/products/flash/">Adobe Flash Professional</a></li>
</ul>
<p><span id="more-91"></span><br />
Make a new folder on your desktop – you can call it whatever you would like, for the tutorial I&#8217;m going to call mine <strong>gallery</strong>. </p>
<p>Extract the file you download from the SimpleViwer site, simpleviewer-pro.zip.</p>
<p>Copy all of the files in the <strong>flash_embed</strong> folder into your <strong>gallery</strong> folder. You will find the Flash Embed example in the SimpleViewer folder you created when you extracted the simpleviewer-pro.zip under <strong>simpleviewer-pro2_1/examples/flash_embed</strong>.</p>
<p>Rename simpleviewer_flash_embed.fla to simpleviewer_swfaddress.fla, delete  simpleviewer_flash_embed.swf and simpleviewer_flash_embed.html.</p>
<p>Unzip swfaddress-2.4zip</p>
<p>Copy the <strong>asual</strong> folder found in <strong>swfaddress-2.4\dist\as\3\com\</strong> to <strong>gallery\com\</strong>.</p>
<p>Copy swfaddress.js from <strong>swfaddress-2.4\dist\js</strong> to the <strong>gallery</strong> folder.</p>
<p>In the <strong>gallery</strong> folder right click new>text document. Rename the text file to index.html.</p>
<p>You should now have all of the files you need in the <strong>gallery</strong> folder:</p>
<ul>
<li>com folder</li>
<li>images folder</li>
<li>thumbs folder</li>
<li>gallery_1.xml</li>
<li>gallery_2.xml</li>
<li>index.html</li>
<li>simpleviewer_swfaddress.fla</li>
<li>simpleviewer.swf</li>
<li>swfaddress.js</li>
</ul>
<p>In your <strong>gallery</strong> folder open index.html and copy the following code into index.html:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Simpleviewer Gallery with SWFAdress<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfaddress.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var flashvars = {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var params = {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.scale = &quot;noscale&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.allowfullscreen = &quot;true&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.allowScriptAccess = &quot;sameDomain&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swfobject.embedSWF(&quot;simpleviewer_swfaddress.swf&quot;, &quot;galleryContent&quot;, &quot;900&quot;, &quot;670&quot;, &quot;10.0.0&quot;, false, flashvars, params);<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span>&gt;</span><br />
&nbsp; &nbsp; object { <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outline:none; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; body {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin:0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding:0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;galleryContent&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>In order to view these galleries you must have <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&quot;</span>&gt;</span>Adobe Flash Player<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span> installed. <br />
&nbsp; &nbsp; If you know that you have Flash installed, then please ensure JavaScript and/or Active Content are enabled.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>In your <strong>gallery</strong> folder open simpleviewer_swfaddress.fla with Adobe Flash Professional. Delete all the buttons and the text box, with the exception of the Load Gallery 1 and 2 buttons. (Feel free to change the background color so it&#8217;s not so hard to look at.) </p>
<p><img src="http://www.mikerichardsphotography.com/blog/wp-content/uploads/2010/01/sv2swfaddress-withoutextrabuttons.jpg" alt="SimpleViewer 2 flash_embed example screen shot" title="sv2swfaddress-withoutextrabuttons" width="550" height="391" class="aligncenter size-full wp-image-101" /> </p>
<p>Now select the code layer&#8217;s Actions &#8211; Frame within the simpleviewer_swfaddress.fla document and replace the existing code with the following:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:700px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//Mike Rchards - mikerichardsphotography.com</span><br />
<span style="color: #808080; font-style: italic;">//This code is provided free without guarantee and is &quot;AS IS&quot;.</span><br />
<br />
<span style="color: #808080; font-style: italic;">//import required classes</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>; <br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">asual</span>.<span style="color: #006600;">swfaddress</span>.<span style="color: #66cc66;">*</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//turn off stage auto resizing</span><br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;<br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>; &nbsp; &nbsp; &nbsp;<br />
<br />
<span style="color: #808080; font-style: italic;">//Init variables</span><br />
<span style="color: #000000; font-weight: bold;">var</span> svAPI:<span style="color: #0066CC;">Object</span>; <span style="color: #808080; font-style: italic;">//svAPI is the object to call API methods on</span><br />
<span style="color: #000000; font-weight: bold;">var</span> swfLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryURL:<span style="color: #0066CC;">String</span>; <span style="color: #808080; font-style: italic;">//used when switching between galleries</span><br />
<span style="color: #000000; font-weight: bold;">var</span> imageIndex:<span style="color: #0066CC;">Number</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> svLoader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//loader to load SimpleViewer swf into</span><br />
<span style="color: #000000; font-weight: bold;">var</span> galleryShowing:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//the default galleryname should be the same as the name of the xml minus .xml</span><br />
<span style="color: #000000; font-weight: bold;">var</span> defaulGallery:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;gallery_1&quot;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> currentGalName:<span style="color: #0066CC;">String</span> =<span style="color: #ff0000;">&quot;&quot;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//add svLoader to the &quot;mcLoader&quot; stage movieclip on the main timeline</span><br />
mcLoader.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>svLoader<span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//listen for SWF loaded</span><br />
svLoader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, onViewerInit<span style="color: #66cc66;">&#41;</span>;<br />
<br />
SWFAddress.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>SWFAddressEvent.<span style="color: #006600;">CHANGE</span>, handleSWFAddress<span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> handleSWFAddress<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:SWFAddressEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> address = SWFAddress.<span style="color: #006600;">getValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> path = <span style="color: #0066CC;">e</span>.<span style="color: #006600;">path</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> arr:<span style="color: #0066CC;">Array</span> = path.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> galName = arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> imgId:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span>arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// If the gallery name is empty set to the default gallery.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>galName == <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">||</span> galName == <span style="color: #ff0000;">&quot;unknown&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>galName = defaulGallery;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// If the image number is not a number set it to the first image.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>imgId<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>imgId =<span style="color: #cc66cc;">0</span>;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; imageIndex = imgId;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// If the galName is not the currentGalName load the new gallery.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>galName <span style="color: #66cc66;">!</span>= currentGalName<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; loadGallery<span style="color: #66cc66;">&#40;</span>galName, imgId<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Adds just the gallery name to the browser title bar. The title is taken from the gallery XML title.</span><br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setTitle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Simpleviewer With SWFAdress &nbsp;: '</span> + galName<span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Example of &nbsp;how to add the gallery name and image ID to the title bar.</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//SWFAddress.setTitle('Simpleviewer With SWFAdress &nbsp;: ' + galName +' image ' + &nbsp;imgId); </span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* This function loads the SimpleViewer SWF<br />
*/</span><br />
<span style="color: #000000; font-weight: bold;">function</span> loadGallery<span style="color: #66cc66;">&#40;</span>galName:<span style="color: #0066CC;">String</span>, imgId:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; currentGalName = galName;<br />
&nbsp; &nbsp; galleryURL = galName + <span style="color: #ff0000;">&quot;.xml&quot;</span>; <span style="color: #808080; font-style: italic;">//url;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//unload previous simpleviewer instance</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>svAPI <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> svAPI.<span style="color: #006600;">dispose</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; svAPI = <span style="color: #000000; font-weight: bold;">null</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//flash 9 - unload</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>swfLoaded<span style="color: #66cc66;">&#41;</span> svLoader.<span style="color: #006600;">unload</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Flash 10 - unloadAndStop </span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//if (_viewerLoaded) svLoader.unloadAndStop();</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/'</span>+galName+<span style="color: #ff0000;">'/'</span>+imgId+<span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//load simpleviewer swf</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> urlReq:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;simpleviewer.swf&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; svLoader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>urlReq<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; swfLoaded = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> updateGalleryUrl<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> path = SWFAddress.<span style="color: #006600;">getValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> arr:<span style="color: #0066CC;">Array</span> = path.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> galName = arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//We are disregarding arr[2] because we are being </span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//passed the new image id, imgIndex, and don't need the current one.</span><br />
<br />
&nbsp; &nbsp; currentGalName = galName;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// SWFAddress.setValue updates the address bar and calls handleChange(event:SWFAddressEvent)</span><br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/'</span>+galName+<span style="color: #ff0000;">'/'</span>+<span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">data</span>+<span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">&#41;</span>; &nbsp; &nbsp;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Fired when preloader is available<br />
* Can set flashvars at this point<br />
*/</span> <br />
<span style="color: #000000; font-weight: bold;">function</span> onViewerInit<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;onViewerInit&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//listen for</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span>svLoader.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;svComplete&quot;</span>, onGalleryLoaded<span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setViewerFlashVars&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> options:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span>svLoader.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">embedOptions</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//set gallery.xml url based on current galleryId</span><br />
&nbsp; &nbsp; options.<span style="color: #006600;">galleryURL</span> = galleryURL; &nbsp; &nbsp;<br />
&nbsp; &nbsp; options.<span style="color: #006600;">firstImageIndex</span> = imageIndex;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
&nbsp;* Fired when gallery has completly loaded (SWF + &nbsp;XML)<br />
&nbsp;* API is now available.<br />
&nbsp;*/</span> <br />
<span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; svAPI = <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span>svLoader.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">api</span>;<br />
&nbsp; &nbsp; svAPI.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span>mcLoader.<span style="color: #006600;">mcFrame</span>.<span style="color: #0066CC;">width</span>,mcLoader.<span style="color: #006600;">mcFrame</span>.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Init Event Listeners</span><br />
&nbsp; &nbsp; svAPI.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;svImageChange&quot;</span>,updateGalleryUrl<span style="color: #66cc66;">&#41;</span>; &nbsp; <br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">//Init Button Click Handlers</span><br />
mcButton1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,loadGallery1<span style="color: #66cc66;">&#41;</span>;<br />
mcButton2.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,loadGallery2<span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//Button Click Handlers</span><br />
<span style="color: #000000; font-weight: bold;">function</span> loadGallery1<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; loadGallery<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;gallery_1&quot;</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> loadGallery2<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; loadGallery<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;gallery_2&quot;</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>Save (Crtl + S) simpleviewer_swfaddress.fla.</p>
<p>Export (Crtl + Alt + Shift + S) simpleviewer_swfaddress.fla as simpleviewer_swfaddress.swf into your <strong>gallery</strong> folder.</p>
<p><strong>To test you must upload the files to your server.</strong></p>
<p>Make sure to upload all of the following files and folders:</p>
<ul>
<li>images folder</li>
<li>thumbs folder</li>
<li>gallery_1.xml</li>
<li>gallery_2.xml</li>
<li>index.html</li>
<li>simpleviewer_swfaddress.swf </li>
<li>simpleviewer.swf</li>
<li>swfaddress.js</li>
</ul>
<p>The browser history is updated every time you click a thumbnail, thus enabling the browser back button. You can now link to any image via a nice URL and as you click on thumbnails you can watch the address bar change. You can also directly link to an image.</p>
<p>This code is provided free without guarantee and is &#8220;AS IS&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikerichardsphotography.com/blog/2010/01/28/how-to-simpleviewer-2-and-swfaddress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: Adding SWFAddress to SimpleViewer</title>
		<link>http://www.mikerichardsphotography.com/blog/2009/05/15/how-to-adding-swfaddress-to-simpleviewer/</link>
		<comments>http://www.mikerichardsphotography.com/blog/2009/05/15/how-to-adding-swfaddress-to-simpleviewer/#comments</comments>
		<pubDate>Fri, 15 May 2009 16:31:19 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[deep linking]]></category>
		<category><![CDATA[flash gallery]]></category>
		<category><![CDATA[simpleviewer]]></category>
		<category><![CDATA[swfaddress]]></category>

		<guid isPermaLink="false">http://www.mikerichardsphotography.com/blog/?p=21</guid>
		<description><![CDATA[SimpleViewer is an flash gallery that has gained some popularity on the net. Like with anything in this world of ours, it has strengths and weaknesses. It&#8217;s primary strength is that it allows people who do not know a lot about flash to set up a flash gallery. One of it&#8217;s weaknesses is that it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.airtightinteractive.com/simpleviewer/pro/">SimpleViewer</a> is an flash gallery that has gained some popularity on the net. Like with anything in this world of ours, it has strengths and weaknesses. It&#8217;s primary strength is that it allows people who do not know a lot about flash to set up a flash gallery. One of it&#8217;s weaknesses is that it does not handle <a href="http://en.wikipedia.org/wiki/Deep_linking">deep linking</a> in flash. Adding deep linking to SimpleViewer allows you to link to an individual image within the gallery instead of just being able to link to the base Flash movie clip. In this article I will show you how to add deep linking to SimpleViewer using <a href="http://www.asual.com/swfaddress/">SWFAddress</a>.</p>
<p>With the integration of SWFAddress,  the browser history will update every time you click a thumbnail, allowing for the use of the browser&#8217;s back button. You also get a nice clean URL, and the updating of the URL allows users to link to individual images which wouldn&#8217;t be possible otherwise.</p>
<p>I will be focusing on a Multiple galleries example, but you could easily adapt this if you only have one gallery.</p>
<p>Here is an <a href="http://www.mikerichardsphotography.com/example/">Example</a> of the finished working code or you can check out my <a href="http://www.mikerichardsphotography.com/gallery/">galleries</a>.</p>
<p><span id="more-21"></span></p>
<p>First and foremost you are going to need SimpleViewer Pro, SWFAddress, <a href="http://code.google.com/p/swfobject/">SWFObject</a> and <a href="http://www.adobe.com/products/flash/">Adobe Flash Professional</a>, so if you don&#8217;t have them head over to their respective sites and grab a copy of each. Adobe offers a free trial of Flash Professional which you can use for 30 days. This tutorial is based on <a href="http://www.airtightinteractive.com/simpleviewer/pro/">SimpleViewer Pro 1.9</a>, <a href="http://swfobject.googlecode.com/files/swfobject_2_2.zip">SWFObject 2.2</a> and <a href="http://www.asual.com/download/swfaddress">SWFAddress 2.4</a>.</p>
<p>Make a new folder on your desktop – you can call it whatever you would like, I&#8217;m going to call mine <strong>gallery</strong>. </p>
<p>Extract the file you download from the SimpleViwer site, simpleviewer-pro.zip.</p>
<p>Copy all of the files in the <strong>Flash Embed example</strong> folder into your <strong>gallery</strong> folder. You will find the Flash Embed example in the SimpleViewer folder you created when you extracted the simpleviewer-pro.zip under <strong>simpleviewer-pro\simpleviewer_pro\examples\Flash Embed</strong>.<br />
Copy all of the files in <strong>simpleviewer-pro\simpleviewer_pro\source</strong> folder into your <strong>gallery</strong> folder.</p>
<p>Unzip swfobject_2_2.zip</p>
<p>Copy swfobject.js from <strong>swfobject_2_2\swfobject</strong> to the <strong>gallery</strong> folder.</p>
<p>Unzip swfaddress-2.4.zip</p>
<p>Copy the <strong>asual folder</strong> found in <strong>swfaddress-2.4\dist\as\2\com\</strong> to <strong>gallery\com\</strong>.</p>
<p>Copy swfaddress.js from <strong>swfaddress-2.4\dist\js</strong> to the <strong>gallery</strong> folder.</p>
<p>In the <strong>gallery</strong> folder right click new>text document. Rename the text file to index.html.</p>
<p>You should now have all of the files you need in the <strong>gallery</strong> folder:</p>
<ul>
<li>com folder</li>
<li>gallery1 folder</li>
<li>gallery2 folder</li>
<li>gallery1.xml</li>
<li>gallery2.xml</li>
<li>index.html</li>
<li>multiple_galleries.fla</li>
<li>multiple_galleries.swf</li>
<li>simpleviewer.fla</li>
<li>viewer.swf</li>
<li>swfobject.js</li>
<li>swfaddress.js</li>
</ul>
<p>In your <strong>gallery</strong> folder open index.html and copy the following code into index.html:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Simpleviewer Gallery with SWFAdress<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfaddress.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var flashvars = {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flashvars.firstImageIndex = &quot;0&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var params = {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.play = &quot;true&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.menu = &quot;false&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.quality = &quot;best&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.scale = &quot;noscale&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.allowfullscreen = &quot;false&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.allowScriptAccess = &quot;sameDomain&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params.swLiveConnect = &quot;true&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var attributes = {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; attributes.id = &quot;galleryContent&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swfobject.embedSWF(&quot;multiple_galleries.swf&quot;, &quot;galleryContent&quot;, &quot;880&quot;, &quot;560&quot;, &quot;8.0.0&quot;, false, flashvars, params, attributes);<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span>&gt;</span><br />
&nbsp; &nbsp; object { outline:none; }<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;galleryContent&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>In order to view these galleries you must have <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&quot;</span>&gt;</span>Adobe Flash Player<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span> installed. <br />
&nbsp; &nbsp; If you know that you have Flash installed, then please ensure JavaScript and/or Active Content are enabled.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>In your <strong>gallery</strong> folder, navigate to <strong>com\airtightinteractive\apps\viewers\simpleViewer</strong> and open Thumb.as with Adobe Flash Professional.</p>
<p>Find (Ctrl + F) public function select() at line 247.</p>
<p>At the end of line 248 hit enter and add:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//This function is for the SWFAdress integration, the main part of which be found in multiple_galleries.fla.</span><br />
<span style="color: #808080; font-style: italic;">//It passes the imageID to the SWFAdress functions when a thumb is clicked.</span><br />
<span style="color: #0066CC;">_root</span>.<span style="color: #006600;">updateGalleryUrl</span><span style="color: #66cc66;">&#40;</span>mIndex<span style="color: #66cc66;">&#41;</span>;</div></div>
<p>Save (Ctrl + S) and close Thumb.as</p>
<p>In your <strong>gallery</strong> folder open simpleviewer.fla with Adobe Flash Professional.</p>
<p>Export (Crtl + Alt + Shift + S) simpleviewer.fla – save as viewer.swf into your <strong>gallery</strong> folder.</p>
<p>In your <strong>gallery</strong> folder open multiple_galleries.fla with Adobe Flash Professional.</p>
<p>Copy the following and paste into line 2 of the code layer&#8217;s Actions &#8211; Frame within the multiple_galleries.fla document:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//Import the SimpleViewer classes</span><br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">airtightinteractive</span>.<span style="color: #006600;">apps</span>.<span style="color: #006600;">viewers</span>.<span style="color: #006600;">simpleViewer</span>.<span style="color: #66cc66;">*</span><br />
<br />
<span style="color: #808080; font-style: italic;">//Import the swfaddress classes</span><br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">asual</span>.<span style="color: #006600;">swfaddress</span>.<span style="color: #66cc66;">*</span><br />
<span style="color: #808080; font-style: italic;">//the default galleryname should be the same as the name of the xml file minus .xml</span><br />
<span style="color: #808080; font-style: italic;">// This is the gallery that will be loaded if the gallery name is null</span><br />
<span style="color: #000000; font-weight: bold;">var</span> defaulGallery:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;gallery1&quot;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> currentGalName:<span style="color: #0066CC;">String</span> =<span style="color: #ff0000;">&quot;&quot;</span>;</div></div>
<p>Remove what is now line 17, var galleryId:Number; </p>
<p>Change line 23 from loadGallery(1); to:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/gallery1/0/'</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>Change line 27 from loadGallery(2); to:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/gallery2/0/'</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>(<em>If you would prefer to link to your galleries via a HTML hyperlink you can remove the buttons from the stage and use &lt;a href=&#8217;http://yoururl.com/foldername/#/galleryname/(optionally include image number/)&#8217; &gt;thelink&lt;/a&gt;. With this method, I could link to the example gallery2 with &lt;a href=&#8217;http://www.mikerichardsphotography.com/example/#/gallery2/&#8217; &gt;thelink&lt;/a&gt;.</em>)</p>
<p>Remove lines 34 (function loadGallery(galId)) through 52 (which is the end of the document) and replace them with the following:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:700px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//Mike Rchards - mikerichardsphotography.com</span><br />
<span style="color: #808080; font-style: italic;">//This code is provided free without guarantee and is &quot;AS IS&quot;.</span><br />
<span style="color: #808080; font-style: italic;">// SWFAddress calls this function when the address changes</span><br />
<span style="color: #808080; font-style: italic;">// (2 Ways: The Browser's address bar , or SWFAddress.setValue())</span><br />
<span style="color: #000000; font-weight: bold;">function</span> handleChange<span style="color: #66cc66;">&#40;</span>event:SWFAddressEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> path = event.<span style="color: #006600;">path</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// The array with the address path information.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> arr:<span style="color: #0066CC;">Array</span> = path.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> galName = arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> imgId = arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span>galName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;&quot;</span> :<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// If the gallery name is empty set to the default gallery.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; galName = defaulGallery;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loadGallery<span style="color: #66cc66;">&#40;</span>galName, imgId<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> currentGalName :<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>imgId == <span style="color: #000000; font-weight: bold;">null</span> or imgId == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>imgId =<span style="color: #ff0000;">&quot;0&quot;</span>;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">firstImageIndex</span> = imgId;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ImageArea.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">showImage</span><span style="color: #66cc66;">&#40;</span>imgId<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ThumbArea.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">selectedThumbIndex</span> = imgId;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">default</span> : <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//if there is no image id load the first image.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>imgId == <span style="color: #000000; font-weight: bold;">null</span> or imgId == <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>imgId =<span style="color: #ff0000;">&quot;0&quot;</span>;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//If the galName is not the currentGalName load the new gallery.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Prevents swf from being reloaded every time you update </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//the address from clicking a thumb</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>currentGalName <span style="color: #66cc66;">!</span>= galName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>loadGallery<span style="color: #66cc66;">&#40;</span>galName, imgId<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//If you have multi word titles you can hard code them </span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// with a simple if, if else and else statements.</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// if (galName == &quot;mytotallycoolimages&quot;){</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//galName = &quot;My Totally Cool Images&quot;;}</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//If you need to hard code wrap the next three lines in the else statement.</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Sets the first letter of the gallery name to be capital.</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//You can safely comment these three lines out if you </span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//don't want this functionality</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> firstLetter:<span style="color: #0066CC;">String</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; firstLetter=galName.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; galName=firstLetter.<span style="color: #0066CC;">toUpperCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+galName.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,t.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Adds just the gallery name. You can safely change the text inside the quotes </span><br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setTitle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Simpleviewer With SWFAdress &nbsp;: '</span> + galName<span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Example of &nbsp;how to add the gallery name and image ID to the title bar.</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//SWFAddress.setTitle('Simpleviewer With SWFAdress &nbsp;: ' + galName +' image ' + &nbsp;imgId); </span><br />
<span style="color: #66cc66;">&#125;</span><br />
SWFAddress.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>SWFAddressEvent.<span style="color: #006600;">CHANGE</span>, handleChange<span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// This function loads the gallery</span><br />
<span style="color: #000000; font-weight: bold;">function</span> loadGallery<span style="color: #66cc66;">&#40;</span>galName:<span style="color: #0066CC;">String</span>, imgId:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
<br />
&nbsp; &nbsp; currentGalName = galName;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">xmlDataPath</span> = galName + <span style="color: #ff0000;">&quot;.xml&quot;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> theId:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span>imgId, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/'</span>+galName+<span style="color: #ff0000;">'/'</span>+theId+<span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// use firstImageIndex to goto the correct image.</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">_root</span>.<span style="color: #006600;">firstImageIndex</span> = theId;&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; mLoader_mcl.<span style="color: #0066CC;">loadClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;viewer.swf&quot;</span>,mcLoader<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span> <br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> updateGalleryUrl<span style="color: #66cc66;">&#40;</span>imgIndex:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> path = SWFAddress.<span style="color: #006600;">getValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> arr:<span style="color: #0066CC;">Array</span> = path.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> galName = arr<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//We are disregarding arr[2] because we are being </span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//passed the new image id, imgIndex, and don't need the current one.</span><br />
<br />
&nbsp; &nbsp; currentGalName = galName;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// SWFAddress.setValue updates the address bar and calls handleChange(event:SWFAddressEvent)</span><br />
&nbsp; &nbsp; SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/'</span>+galName+<span style="color: #ff0000;">'/'</span>+imgIndex+<span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>Save (Crtl + S) multiple_galleries.fla.</p>
<p>Export (Crtl + Alt + Shift + S) multiple_galleries.fla as multiple_galleries.swf into your <strong>gallery</strong> folder.</p>
<p><strong>To test you must upload the files to your server.</strong></p>
<p>Make sure to upload all of the following files and folders:</p>
<ul>
<li>gallery1 folder</li>
<li>gallery2 folder</li>
<li>gallery1.xml</li>
<li>gallery2.xml</li>
<li>index.html</li>
<li>multiple_galleries.swf</li>
<li>viewer.swf</li>
<li>swfobject.js</li>
<li>swfaddress.js</li>
</ul>
<p>The browser history is updated every time you click a thumbnail, thus enabling the browser back button. You can now link to any image via a nice URL and as you click on thumbnails you can watch the address bar change. </p>
<p>This code is provided without guarantee and is &#8220;AS IS&#8221;.<ins datetime="2010-01-25T20:19:21+00:00"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikerichardsphotography.com/blog/2009/05/15/how-to-adding-swfaddress-to-simpleviewer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
