<?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>Thomas Gabrielsens weblog &#187; Flash</title>
	<atom:link href="http://arton.no/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://arton.no/blog</link>
	<description>Just another weblog</description>
	<lastBuildDate>Sun, 04 Jul 2010 22:33:13 +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>PHP urlencode() and urldecode()</title>
		<link>http://arton.no/blog/2010/04/16/php-urlencode-and-urldecode/</link>
		<comments>http://arton.no/blog/2010/04/16/php-urlencode-and-urldecode/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:32:59 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=331</guid>
		<description><![CDATA[&#60;/p&#62; &#60;p&#62;&#38;lt;?php&#60;/p&#62; &#60;p&#62; $testString = &#38;quot;This is a test &#38;#8216; with &#38;#8216; several apostrophes&#38;#8217;&#38;quot;;&#60;br /&#62; echo $testString . &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;; // This is a test &#38;#8216; with &#38;#8216; several apostrophes&#38;#8217;&#60;br /&#62; $testString = urlencode( $testString );&#60;br /&#62; echo $testString . &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;; // This+is+a+test+%27+with+%27+several+apostrophes%27&#60;br /&#62; $testString = urldecode( $testString );&#60;br /&#62; echo $testString . &#38;quot;&#38;lt;br [...]]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: php;">&lt;/p&gt;
&lt;p&gt;&amp;lt;?php&lt;/p&gt;
&lt;p&gt; $testString = &amp;quot;This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&amp;quot;;&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&lt;br /&gt;
 $testString = urlencode( $testString );&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This+is+a+test+%27+with+%27+several+apostrophes%27&lt;br /&gt;
 $testString = urldecode( $testString );&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&lt;br /&gt;
?&amp;gt;&lt;/p&gt;
&lt;p&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2010/04/16/php-urlencode-and-urldecode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air, SQLite,  and apostrophes</title>
		<link>http://arton.no/blog/2010/03/16/adobe-air-sqlite-and-apostrophes/</link>
		<comments>http://arton.no/blog/2010/03/16/adobe-air-sqlite-and-apostrophes/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 13:04:30 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[escape()]]></category>
		<category><![CDATA[rawurldecode()]]></category>
		<category><![CDATA[rawurlencode()]]></category>
		<category><![CDATA[unescape()]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=325</guid>
		<description><![CDATA[I&#8217;m currently developing an Air application and I run into a problem inserting file names with apostrophe (because apostrophe are used as string delimiter). There are several ways to handle this problem. You can add two apostrophes, and Jake Churchill has made a function for this. While working with back-end I&#8217;ve used PHP&#8217;s utf8_encode edit: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently developing an Air application and I run into a problem   inserting file names with apostrophe (because apostrophe are used as   string delimiter). There are several ways to handle this problem. You   can add two apostrophes, and <a href="http://www.reynacho.com/2008/08/custom-object-parsing-function/">Jake Churchill has made a function for   this</a>.</p>
<p>While working with back-end I&#8217;ve used PHP&#8217;s <span style="text-decoration: line-through;"><a href="http://www.php.net/manual/en/function.utf8-encode.php">utf8_encode</a></span> <span style="color: #800000;">edit: I meant <a href="http://php.net/manual/en/function.urlencode.php">rawurlencode()</a> </span>quite a lot, and AS3 has several similar functions, but there is only one that encodes apostrophes, and it&#8217;s called <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/package.html#escape%28%29">escape()</a>. So what you can do is escape() the strings to be inserted into SQLite, and use <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/package.html#unescape%28%29">unescape()</a> after receiving the string back from the database.</p>
<p>Here is an example with escape() and unescape() used in AS3:<pre class="brush: as3;">var testString:String = &amp;quot;This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&amp;quot;;&lt;br /&gt;
trace( testString ); // This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&lt;br /&gt;
testString = escape( testString );&lt;br /&gt;
trace( testString ); //This%20is%20a%20test%20%27%20with%20%27%20several%20apostrophes%27&lt;br /&gt;
testString = unescape( testString );&lt;br /&gt;
trace( testString ); //This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;</pre></p>
<p>Here is an example with rawurlencode and rawurldecode() used in PHP:<pre class="brush: php;">$testString = &amp;quot;This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&amp;quot;;&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;&lt;br /&gt;
 $testString = rawurlencode( $testString );&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This%20is%20a%20test%20%27%20with%20%27%20several%20apostrophes%27&lt;br /&gt;
 $testString = rawurldecode( $testString );&lt;br /&gt;
 echo $testString . &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;; // This is a test &amp;#8216; with &amp;#8216; several apostrophes&amp;#8217;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2010/03/16/adobe-air-sqlite-and-apostrophes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sound visualizer in Flash</title>
		<link>http://arton.no/blog/2009/04/28/sound-visualizer-in-flash/</link>
		<comments>http://arton.no/blog/2009/04/28/sound-visualizer-in-flash/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 15:58:49 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[spectrum analyser]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=180</guid>
		<description><![CDATA[Per Kristian Stoveland held a cool presentation of his Sound Spectrum Analyzer at FUGN (Flash user group Norway) in the beginning of April. Inspired by this session I decided to try this my self. I remembed seeing a beutifull graphic called &#8220;Imagination&#8221; made by Paul Neave, which he also had released as open source. So [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.perkstoveland.com" target="_blank">Per Kristian Stoveland</a> held a cool presentation of his <a href="http://www.perkstoveland.com/archives/38" target="_blank">Sound Spectrum Analyzer</a> at <a href="http://www.fugn.com/" target="_blank">FUGN</a> (Flash user group Norway) in the beginning of April. Inspired by this session I decided to try this my self.<br />
I remembed seeing a beutifull graphic called <a href="http://www.neave.com/imagination/" target="_blank">&#8220;Imagination&#8221;</a> made by <a href="http://www.neave.com/" target="_blank">Paul Neave</a>, which he also had released as open source. So I grabbed my copy of it and tweaked a little bit and instead of mouse interaction I hooked it up with the SoundMixer.computeSpectrum() in Flash. I turned out pretty cool I think!<br />
This is my first attempt so there will be more to come. The source code need to be cleaned up so I will release it later. The awesome soundtrack is by <a href="www.virgill.scene.org" target="_blank">virgill</a> &amp; tasium.</p>
<p><a href="http://arton.no/blog/SoundVisualizer/index.html" target="_blank">Check it out!</a></p>
<p><a href="http://arton.no/blog/SoundVisualizer/index.html" target="_blank"><img class="aligncenter size-full wp-image-186" title="soundvisualizer" src="http://arton.no/blog/wp-content/uploads/2009/04/soundvisualizer.jpg" alt="soundvisualizer" width="450" height="245" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2009/04/28/sound-visualizer-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colin Moock, James Patterson and Hoss Gifford with new training video</title>
		<link>http://arton.no/blog/2009/04/25/new-training-video/</link>
		<comments>http://arton.no/blog/2009/04/25/new-training-video/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 13:09:40 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Guitar]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[colin Moock]]></category>
		<category><![CDATA[Hoss Gifford]]></category>
		<category><![CDATA[James patterson]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=154</guid>
		<description><![CDATA[Colin Moock, James Patterson and Hoss Gifford has put out a new training video series called:  &#8220;The lost Actionscript 3 weekend&#8221;. You can download some free chapters and after watching them I must say I&#8217;m going to buy the DVD&#8217;s. Use this link to get a discount. It&#8217;s impressive that Colin Moock manage to outtalk [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.moock.org/" target="_blank">Colin Moock</a>, <a href="http://presstube.com/" target="_blank">James Patterson</a> and <a href="http://hossgifford.com/" target="_blank">Hoss Gifford</a> has put out a new training video series called:  &#8220;The lost Actionscript 3 weekend&#8221;. You can download some <a href="http://www.moock.org/blog/archives/000289.html" target="_blank">free chapters</a> and after watching them I must say I&#8217;m going to <a href="http://www.oreilly.com/go/law" target="_self">buy</a> the DVD&#8217;s. <span class="status-body"><span class="entry-content">Use <a href="http://www.oreilly.com/go/law" target="_blank">this link</a> to get a discount. </span></span></p>
<p><span class="status-body"><span class="entry-content">It&#8217;s impressive that Colin Moock manage to outtalk both Hoss Gifford and James Patterson, and at the same time! <img src='http://arton.no/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />
</span></span></p>
<p><a href="http://www.moock.org/blog/archives/000289.html">Check it out!</a></p>
<p><img class="size-full wp-image-170 alignleft" title="The lost Actionscript 3 weekend" src="http://arton.no/blog/wp-content/uploads/2009/04/the_lost_actionscript_3_weekend.jpg" alt="The lost Actionscript 3 weekend" width="450" height="253" /></p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2009/04/25/new-training-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash on the Beach</title>
		<link>http://arton.no/blog/2008/09/30/flash-on-the-beach/</link>
		<comments>http://arton.no/blog/2008/09/30/flash-on-the-beach/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 15:28:43 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash on the Beach]]></category>
		<category><![CDATA[FOTB]]></category>
		<category><![CDATA[FOTB08]]></category>
		<category><![CDATA[Fugn]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=28</guid>
		<description><![CDATA[  I&#8217;m currently on Flash on the Beach in Brighton. I were here last year and it strucked me then how well organized this conference was, and I must say it lives up to its reputation this year as well. This year I&#8217;m together with Hågen Landsem, which actually was my teacher at school, and [...]]]></description>
			<content:encoded><![CDATA[<p> <img src="http://arton.no/blog/wp-content/uploads/2008/09/fotb_375_x_120_ag_a.gif" alt="Flash on the beach 2008" /></p>
<p>I&#8217;m currently on Flash on the Beach in Brighton. I were here last year and it strucked me then how well organized this conference was, and I must say it lives up to its reputation this year as well. This year I&#8217;m together with Hågen Landsem, which actually was my teacher at school, and of course all the other guys from Norway (and the rest of the world for that matter).</p>
<p>One thing we&#8217;ve noticed is that FOTB08 is a little bit more technical than last year; the Flex/Air session is dominating more now. This is a trend that runs the hole Flash community. This was something Hågen and I talked about yesterday, and It was interesting to hear some speakers expressed their concern about this evolution as well. One of the speakers that addressed this was <a href="http://aralbalkan.com/">Aral Balkan</a>, he had a very nice session that was both entertaining, inspiring and an eye opener for many I think. He talked about the simplicity of AS1 compared to AS2, and especially AS3 and how this might be negative for the Flash community. That it might leave some of the creative people out of the Flash community, and those are, by my opinion, the most important users of the Flash platform. It is the creative part that has brought Flash to what it is today.</p>
<p>Anyway, we had a short chat when he was done and he really seems like a nice guy. I think it is very important that guys like Aral Balkan speak up about this.</p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2008/09/30/flash-on-the-beach/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash and SEO</title>
		<link>http://arton.no/blog/2008/05/12/flash-and-seo/</link>
		<comments>http://arton.no/blog/2008/05/12/flash-and-seo/#comments</comments>
		<pubDate>Mon, 12 May 2008 19:28:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[rewrite engine]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://arton.no/blog/?p=10</guid>
		<description><![CDATA[Flash and SEO has been quite a problem and the main argument for the people in the business who is against Flash. I&#8217;ve planned to do something about this for a long time and finally I found a project that was suitable to try this. First I will say that many people think that making [...]]]></description>
			<content:encoded><![CDATA[<p>Flash and SEO has been quite a problem and the main argument for the people in the business who is against Flash. I&#8217;ve planned to do something about this for a long time and finally I found a project that was suitable to try this. First I will say that many people think that making a website completely in Flash is craziness, and very often I do agree. However sometimes the client wants a &#8220;flashy&#8221; site with lots of animations and stuff and how am I to deny them that?</p>
<p>Since the introduction of <a href="http://blog.deconcept.com/swfobject/" target="_blank">SWFObject</a> it&#8217;s been quite easy to provide the user with html content for those who does not have flash installed, and this is what I&#8217;ve done. Since I use <a href="http://www.amfphp.org/">amfphp</a> a lot and also for my little CMS for flash, all the content except from the images are stored in a mySQL database. This makes it easy to extract all the content and echo it out in the flashcontent div tag.</p>
<p>I did this for a project called <a href="http://www.moelo.no" target="_blank">moelo.no</a> and after a while Google <a href="http://www.google.no/search?q=site%3Amoelo.no&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">index the whole site</a>. To make it even more search friendly I used <a href="http://www.apache.org/">Apache</a> <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">Rewrite Engine</a> to replace the query string URL with more search friendly URLs. I was surprised how easy easy it was to write the rewrite rule. Here is the all the lines I had to write to make it work:<br />
<code><br />
</code></p>
<p>RewriteRule ^kategori/([0-9]+)/underkategori/([0-9]+)/prosjekt/ ([0-9]+)(.*)\.html$ index.php?KategoriID=$1&amp;UnderkategoriID=$2&amp;ProsjektID=$3<br />
RewriteRule ^kategori/([0-9]+)/underkategori/([0-9]+)(.*)\.html$ index.php?KategoriID=$1&amp;UnderkategoriID=$2<br />
RewriteRule ^kategori/([0-9]+)(.*)\.html$ index.php?KategoriID=$1</p>
<p>Now basically what this does is rewrite a url that looks like this:</p>
<p><a href="http://www.moelo.no/index.php?KategoriID=1&amp;UnderkategoriID=6" target="_blank">http://www.moelo.no/index.php?KategoriID=1&amp;UnderkategoriID=6</a></p>
<p>to this:</p>
<p><a href="http://www.moelo.no/kategori/1/underkategori/6/" target="_blank">http://www.moelo.no/kategori/1/underkategori/6/</a></p>
<p>Then I add a suffix that takes the title of the article as filename and adds a .html extension to the end to to the URL to make it even more search friendly. The rewrite engine rules just ignores this.  Now the URL looks like this:</p>
<p><a href="http://www.moelo.no/kategori/1/underkategori/6/boliger.html" target="_blank">http://www.moelo.no/kategori/1/underkategori/6/boliger.html</a></p>
<p>The next trick was to actually show the right content in the flash version as well when a user clicked a link in Google. I did this very easy by passing the arguments to SWFObject and this way I could load them as variables in flash:</p>
<p><code><br />
var so = new SWFObject("<a href="http://www.moelo.no/index.swf" class="linkification-ext" title="Linkification: http://www.moelo.no/index.swf">http://www.moelo.no/index.swf</a>", "index", "1000", "600", "8", "#ffffff");<br />
so.addParam("quality", "best");<br />
so.addVariable("kategoriid", "4");<br />
so.addVariable("underkategoriid", "15");<br />
so.addVariable("prosjektid", "122");<br />
so.addVariable("forsiden", "");<br />
so.write("wrapper");</code></p>
<p>Finally I added a rule in the robot.txt file that blocks the SWF-file from all robots.</p>
<p>It works like a charm!</p>
<p>The next job is to rewrite my hole flash based CMS into OOP because the hole shit is written in procedural code. This happened because it started as a minor project a long time ago and it has escalated for each project, and this makes it a pain in the ass to update and maintain.</p>
]]></content:encoded>
			<wfw:commentRss>http://arton.no/blog/2008/05/12/flash-and-seo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
