<?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>Barklund.org &#187; Konstellation</title>
	<atom:link href="http://www.barklund.org/blog/category/general/konstellation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barklund.org/blog</link>
	<description>work smarter when building current web trends</description>
	<lastBuildDate>Wed, 26 May 2010 09:49:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>iPad detection the right way</title>
		<link>http://www.barklund.org/blog/2010/04/23/ipad-detection/</link>
		<comments>http://www.barklund.org/blog/2010/04/23/ipad-detection/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 09:22:34 +0000</pubDate>
		<dc:creator>Barklund</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Konstellation]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[Trends]]></category>

		<guid isPermaLink="false">http://www.barklund.org/blog/?p=760</guid>
		<description><![CDATA[Here at Konstellation, we just launched the PageGangster for mobile devices including iPad, iPhone, iPod touch and Android. I developed the clientside for this in JavaScript and we launched it with automatic user agent detection serverside. But this had some problems. I read some info about this and conclude, that some iPad user agent strings [...]


Related posts:<ol><li><a href='http://www.barklund.org/blog/2009/11/23/iphone-developer-boycott-in-the-works/' rel='bookmark' title='Permanent Link: The iPhone developer boycott in the works'>The iPhone developer boycott in the works</a></li>
<li><a href='http://www.barklund.org/blog/2010/01/11/coordinate-proxy-january-2010-idea/' rel='bookmark' title='Permanent Link: Coordinate-Proxy &#8211; January 2010 Ideas'>Coordinate-Proxy &#8211; January 2010 Ideas</a></li>
<li><a href='http://www.barklund.org/blog/2010/01/07/app-idea-store-january-2010-idea/' rel='bookmark' title='Permanent Link: App Idea Store &#8211; January 2010 Ideas'>App Idea Store &#8211; January 2010 Ideas</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_766" class="wp-caption alignright" style="width: 160px"><img src="http://www.barklund.org/blog/wp-content/uploads/2010/04/ipad-300x241.jpg" alt="iPad in action" title="iPad" width="150" height="120" class="size-medium wp-image-766" /><p class="wp-caption-text">The famous large flat thing slightly more useful than a rock</p></div>
<p>Here at <a href="http://konstellation.dk/" title="Konstellation homepage">Konstellation</a>, we just launched the <a href="http://pagegangster.com" title="PageGangster - convert your PDF to an experience">PageGangster</a> for <a href="http://www.pagegangster.com/mobile-devices/" title="Introduction about PageGangster for mobile devices">mobile devices</a> including iPad, iPhone, iPod touch and Android. I developed the clientside for this in JavaScript and we launched it with automatic user agent detection serverside. But this had some problems.</p>
<p><span id="more-760"></span></p>
<p>I read <a href="http://www.nczonline.net/blog/2010/04/06/ipad-web-development-tips/" title="iPad web development tips from nczonline.net">some info</a> about this and conclude, that some iPad user agent strings include the word &#8220;iPhone&#8221; and some users of all types of devices fake their user agent strings.</p>
<p>But then I read on the above link, that no matter what, the <code>navigator.platform</code> attribute would always be set to the right type of device. So in the regular web version of the publication viewer we have now (which uses Flash), we have added a JavaScript detecting if the serverside script did not redirect the client properly:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>navigator <span style="color: #339933;">&amp;&amp;</span> navigator.<span style="color: #660066;">platform</span> <span style="color: #339933;">&amp;&amp;</span> navigator.<span style="color: #660066;">platform</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^(iPad|iPod|iPhone)$/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	location.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>location.<span style="color: #660066;">href</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;?force-mobile&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It seems simple, but solves the problem of some users seeing the dreaded blue box instead of their publication optimized for their device.</p>
<p>On another node, this experience of developing a web application for the iPad/iPhone was very rewarding and I gained many insights, which might spawn other posts. And if you have any questions about it in any way, feel free to ask here &#8211; but please do not submit bug reports about the PageGangster for mobile &#8211; do that via <a href="mailto:info@pagegangster.com">info@pagegangster.com</a> instead.</p>


<p>Related posts:<ol><li><a href='http://www.barklund.org/blog/2009/11/23/iphone-developer-boycott-in-the-works/' rel='bookmark' title='Permanent Link: The iPhone developer boycott in the works'>The iPhone developer boycott in the works</a></li>
<li><a href='http://www.barklund.org/blog/2010/01/11/coordinate-proxy-january-2010-idea/' rel='bookmark' title='Permanent Link: Coordinate-Proxy &#8211; January 2010 Ideas'>Coordinate-Proxy &#8211; January 2010 Ideas</a></li>
<li><a href='http://www.barklund.org/blog/2010/01/07/app-idea-store-january-2010-idea/' rel='bookmark' title='Permanent Link: App Idea Store &#8211; January 2010 Ideas'>App Idea Store &#8211; January 2010 Ideas</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.barklund.org/blog/2010/04/23/ipad-detection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GTween is the bomb for rapid prototyping</title>
		<link>http://www.barklund.org/blog/2009/05/19/gtween-bomb/</link>
		<comments>http://www.barklund.org/blog/2009/05/19/gtween-bomb/#comments</comments>
		<pubDate>Tue, 19 May 2009 11:11:55 +0000</pubDate>
		<dc:creator>Barklund</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Konstellation]]></category>

		<guid isPermaLink="false">http://www.barklund.org/blog/2009/05/19/gtween-bomb/</guid>
		<description><![CDATA[I&#8217;ve been using tweens a lot recently &#8211; for example while developing the small campaign site for the new Peugeot 206+ and Peugeot Blue Drive campaign (in Danish). I used GTween and GTweenTimeline to a great extent to really make it easy for me to implement and update. One of the main things, that I [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using tweens a lot recently &#8211; for example while developing the small campaign site for the new <a href="http://www.bluedrive.dk/" title="Blue Drive Campaign">Peugeot 206+ and Peugeot Blue Drive campaign (in Danish)</a>. I used <a href="http://www.gskinner.com/libraries/gtween/" title="Main page for GTween library by gskinner.com">GTween and GTweenTimeline</a> to a great extent to really make it easy for me to implement and update.</p>
<p><span id="more-50"></span></p>
<p>One of the main things, that I conceptually did in a different way on this site is, that I created tweens before I needed them. Actually, I created tween objects without even knowing what I wanted to tween at the time.</p>
<p>E.g. the &#8220;sound on/off&#8221; button (which unfortunately was removed just before launch) was implemented in a very simple way. On the class I kept a reference to a tween-object, and I created an instance for this as soon as the sound started playing (in continuous loop):</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> background_music:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> BackgroundMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> sc:SoundChannel = background_music.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">100000</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// to infinity and beyond</span>
soundtween = <span style="color: #000000; font-weight: bold;">new</span> GTween<span style="color: #66cc66;">&#40;</span>sc.<span style="color: #006600;">soundTransform</span>, <span style="color: #cc66cc;">0.3</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>In this way, I can simply make the sound start fading by changing the volume-attribute on the proxy object of the soundtween-property:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">soundtween.<span style="color: #006600;">proxy</span>.<span style="color: #006600;">volume</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #808080; font-style: italic;">// fade out</span></pre></div></div>

<p>Though, as some might remember, you <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundChannel.html#soundTransform" title="LiveDocs entry for flash.media.SoundChannel.soundTransform">cannot simply change the volume-attribute directly on the soundTransform-property of your SoundChannel</a>. You need to copy the SoundTransform instance to a local variable, change the volume and re-assign the soundTransform-property. However, GTween takes care of this in a very simple way:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">soundtween.<span style="color: #006600;">setAssignment</span><span style="color: #66cc66;">&#40;</span>sc, <span style="color: #ff0000;">&quot;soundTransform&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>This is not only useful for sounds but also for all the other transform objects like <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/geom/Transform.html" title="LiveDocs entry for flash.geom.Transform">DisplayObject.transform.colorTransform, DisplayObject.transform.matrix</a> and other objects that require re-assignment before having an effect.</p>
<p>I will furthermore in additional posts describe how I have used GTweenTimeline for rapid prototype development with very nice transitions.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.barklund.org/blog/2009/05/19/gtween-bomb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new job: Web Guru at Konstellation</title>
		<link>http://www.barklund.org/blog/2009/05/11/my-new-job-web-guru-at-konstellation/</link>
		<comments>http://www.barklund.org/blog/2009/05/11/my-new-job-web-guru-at-konstellation/#comments</comments>
		<pubDate>Mon, 11 May 2009 14:02:54 +0000</pubDate>
		<dc:creator>Barklund</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Konstellation]]></category>

		<guid isPermaLink="false">http://www.barklund.org/blog/2009/05/11/my-new-job-web-guru-at-konstellation/</guid>
		<description><![CDATA[After having worked at Shockwaved, TBWA\PLAY and TBWA\Denmark through 7 years (same company, different name), I finally grew the nuts to find a new job. Actually the new job found me, as it was a bunch of former colleagues at Konstellation, who had started up 2-3 years ago and now have grown into an interesting [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>After having worked at Shockwaved, TBWA\PLAY and TBWA\Denmark through 7 years (same company, different name), I finally grew the nuts to find a new job. Actually the new job found me, as it was a bunch of former colleagues at <a href="http://www.konstellation.dk/" title="Konstellation website">Konstellation</a>, who had started up 2-3 years ago and now have grown into an interesting company. I started here May 1st, 2009. They even <a href="http://www.konstellation.dk/blog/2009/05/konstellation-upgrade/" title="Konstellation upgrade">blogged me (in Danish)</a>.</p>
<p><span id="more-49"></span></p>
<p>My primary work will be somewhat the same just more hands-on with projects and not too much specification and handing it over to external parties for actual implementation. This will be a comeback to ActionScript for me and a lot of other practical programming, which will come hand in hand with this blog (and the Konstellation blog) to be used for a lot of posts about my experiences with different frameworks, methodologies, libraries, languages etc.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.barklund.org/blog/2009/05/11/my-new-job-web-guru-at-konstellation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
