<?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>X-Com</title>
	<atom:link href="http://www.x-com.se/feed" rel="self" type="application/rss+xml" />
	<link>http://www.x-com.se</link>
	<description>X-Com är en digital produktionsbyrå i Eskilstuna som producerar kampanjer, spel, tävlingar, webbplatser och applikationer.</description>
	<lastBuildDate>Wed, 21 Mar 2012 13:15:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Heda &#8211; Heda Murar</title>
		<link>http://www.x-com.se/produktioner/appar#heda-murar</link>
		<comments>http://www.x-com.se/produktioner/appar#heda-murar#comments</comments>
		<pubDate>Wed, 21 Mar 2012 08:41:05 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Appar]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2073</guid>
		<description><![CDATA[För Heda, tillsammans med reklambyrån Mecka, har vi tagit fram ...]]></description>
			<content:encoded><![CDATA[<p>För Heda, tillsammans med reklambyrån Mecka, har vi tagit fram en app för deras mur-kollektion. I denna app som finns tillgänglig för både iPhone och Android kan du prova murar direkt i din trädgård, eller använda redan tagna bilder från telefonen.</p>
<p><a href="http://goo.gl/uGowi" target="_blank">Ladda hem till iPhone</a></p>
<p><a href="http://goo.gl/Ce57r" target="_blank">Ladda hem till Android</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/appar#heda-murar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HBO &#8211; Game of Thrones</title>
		<link>http://www.x-com.se/produktioner/kampanjer#hbo-game-of-thrones</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#hbo-game-of-thrones#comments</comments>
		<pubDate>Tue, 13 Mar 2012 16:33:18 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2069</guid>
		<description><![CDATA[Tillsammans med Stink Digital i New York har vi skapat ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Stink Digital i New York har vi skapat en facebookkampanj för tv-serien Game of Thrones. Denna äventyrsserie utspelar sig i en fiktiv medeltida värld där det pågår en hänsynslös kamp om tronen. I kampanjen är det denna tron du nu ska utmana dina vänner om. Det är era gemensamma vänner som avgör vem som ska gå segrande med livet i behåll. Vilka av dina vänner är lojala?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#hbo-game-of-thrones/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Försvarsmakten &#8211; Vem bryr sig?</title>
		<link>http://www.x-com.se/produktioner/kampanjer#forsvarsmakten-vem-bryr-sig</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#forsvarsmakten-vem-bryr-sig#comments</comments>
		<pubDate>Mon, 12 Mar 2012 08:45:17 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2056</guid>
		<description><![CDATA[&#8220;Vem bryr sig?&#8221; är vår senaste produktion som vi tillsammans ...]]></description>
			<content:encoded><![CDATA[<p>&#8220;Vem bryr sig?&#8221; är vår senaste produktion som vi tillsammans med B-Reel tagit fram åt Försvarsmakten. Vid Sergels torg i Stockholm kunde förbipasserande se en person instängd i en box. Tanken med kampanjen var att se vilka som kunde tänka sig att göra en uppoffring för en annan människa och gå in i boxen för att ersätta den instängda. Allt som skedde i boxen kunde följas live på kampanjsajten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#forsvarsmakten-vem-bryr-sig/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Svedbergs &#8211; Fyll mitt badkar</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svedbergs-fyll-mitt-badkar</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svedbergs-fyll-mitt-badkar#comments</comments>
		<pubDate>Mon, 27 Feb 2012 09:38:07 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2049</guid>
		<description><![CDATA[Fyll mitt badkar är en kampanj för Svedbergs som vi ...]]></description>
			<content:encoded><![CDATA[<p>Fyll mitt badkar är en kampanj för Svedbergs som vi gjort tillsammans med reklambyrån Mecka. Denna Facebook-kampanj går ut på att skapa ett eget badkar och be sina vänner hjälpa till med att fylla den med vatten. Deltagaren som fyllt sitt badkar med mest vatten vinner ett badkar till ett värde av 10 000 kr!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svedbergs-fyll-mitt-badkar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burger King &#8211; Flam-O-Gram</title>
		<link>http://www.x-com.se/produktioner/kampanjer#burger-king-flam-o-gram</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#burger-king-flam-o-gram#comments</comments>
		<pubDate>Tue, 07 Feb 2012 09:52:45 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2038</guid>
		<description><![CDATA[För Burger King på uppdrag av reklambyrån Shout har vi ...]]></description>
			<content:encoded><![CDATA[<p>För Burger King på uppdrag av reklambyrån Shout har vi skapat en Facebookkampanj inför Alla hjärtans dag. Kampanjen går ut på att besökare kan skicka elektroniska kärleksbrev, även kallat &#8220;flam-o-gram&#8221;, till sin käraste och på det sättet få upp till 50% rabatt på ett Valentine&#8217;s meal. Kärleksbrevet postas på mottagarens Facebookvägg och ju mer kärleksfullt brevet är, desto mer rabatt får man.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#burger-king-flam-o-gram/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hornstull &#8211; Nice to Meet You</title>
		<link>http://www.x-com.se/produktioner/kampanjer#hornstull-nice-to-meet-you</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#hornstull-nice-to-meet-you#comments</comments>
		<pubDate>Thu, 15 Dec 2011 09:01:05 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2026</guid>
		<description><![CDATA[Just nu pågår en stor ombyggnation av Hornstull i Stockholm. ...]]></description>
			<content:encoded><![CDATA[<p>Just nu pågår en stor ombyggnation av Hornstull i Stockholm. En temporär tunnel har byggts för att leda folket förbi byggplatsen. För att tunneln ska bli lite roligare att passera har vi, tillsammans med B-Reel och reklambyrån Abby Norm, skapat en interaktiv skog som just nu växer fram. Nya träd och löv bildas för varje person som passerar, när någon twittrar med #hornstull, när någon gillar Hornstull på Facebook eller när ett möte skapas i tunneln. Tack vare att vi använder oss av Microsoft Kinect-teknik, som <a href="http://vimeo.com/28706830">vi experimenterade med tidigare</a>, så kan besökarna interagera med skogen och t.ex skapa ett möte genom att två personer står nära varandra.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#hornstull-nice-to-meet-you/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STIGA &#8211; Scoreboard for Table Hockey</title>
		<link>http://www.x-com.se/produktioner/appar#stiga-scoreboard-for-table-hockey</link>
		<comments>http://www.x-com.se/produktioner/appar#stiga-scoreboard-for-table-hockey#comments</comments>
		<pubDate>Tue, 13 Dec 2011 09:49:35 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Appar]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2014</guid>
		<description><![CDATA[I samarbete med STIGA har vi skapat en app som ...]]></description>
			<content:encoded><![CDATA[<p>I samarbete med STIGA har vi skapat en app som varje hängiven bordshockeyspelare måste ha. iPhone och iPad appen möjliggör poängräkning på ett kul sätt i tre olika spellägen. När du väl har vunnit matchen kan du dela detta till dina vänner på Facebook så alla vet vem det är som dominerar!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/appar#stiga-scoreboard-for-table-hockey/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Högskolan Dalarna &#8211; MI-Flow</title>
		<link>http://www.x-com.se/produktioner/webbplatser#hogskolan-dalarna-mi-flow</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#hogskolan-dalarna-mi-flow#comments</comments>
		<pubDate>Tue, 13 Dec 2011 08:21:40 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2009</guid>
		<description><![CDATA[Vi blev kontaktade av Högskolan i Dalarna som ville utveckla ...]]></description>
			<content:encoded><![CDATA[<p>Vi blev kontaktade av Högskolan i Dalarna som ville utveckla ett online supportverktyg för hantering av teknik i rörlig-bild-produktion. Tanken med verktyget var att hjälpa finna det bästa arbetsflödet och varna för kompabilitetsproblem. Detta verktyg kallas för MI-Flow, vilket står för Moving Image Flow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#hogskolan-dalarna-mi-flow/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Borås Gymnasieskolor &#8211; Framtidens Skolkatalog</title>
		<link>http://www.x-com.se/produktioner/kampanjer#boras-gymnasieskolor-framtidens-skolkatalog</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#boras-gymnasieskolor-framtidens-skolkatalog#comments</comments>
		<pubDate>Fri, 02 Dec 2011 15:00:52 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=2005</guid>
		<description><![CDATA[Tillsammans med reklambyrån Mecka har vi skapat Framtidens skolkatalog för ...]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Tillsammans med reklambyrån Mecka har vi skapat Framtidens skolkatalog för Borås</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Gymnasieskolor. Elever som ska välja gymnasieprogram till våren kan logga in på</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">sajten med sitt facebook-konto, välja vilka program de är intresserade av och sedan</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">se vilka andra som också är intresserade av samma program.</div>
<p>Tillsammans med reklambyrån Mecka har vi skapat Framtidens skolkatalog för Borås Gymnasieskolor. Elever som ska välja gymnasieprogram till våren kan logga in på sajten med sitt facebook-konto, välja vilka program de är intresserade av och sedan se vilka andra som också är intresserade av samma program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#boras-gymnasieskolor-framtidens-skolkatalog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marks Kommun &#8211; Stanna i Mark</title>
		<link>http://www.x-com.se/produktioner/kampanjer#marks-kommun-stanna-i-mark</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#marks-kommun-stanna-i-mark#comments</comments>
		<pubDate>Mon, 24 Oct 2011 12:45:42 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1979</guid>
		<description><![CDATA[Reklambyrån Mecka gav oss i uppdrag att skapa en kampanj ...]]></description>
			<content:encoded><![CDATA[<p>Reklambyrån Mecka gav oss i uppdrag att skapa en kampanj för Marks kommun som går ut på att &#8220;skrämma&#8221; ungdomar att stanna kvar och studera vid Marks Gymnasieskola.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#marks-kommun-stanna-i-mark/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bonnier Tidskrifter &#8211; Framtida uppslag</title>
		<link>http://www.x-com.se/produktioner/kampanjer#bonnier-framtida-uppslag</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#bonnier-framtida-uppslag#comments</comments>
		<pubDate>Wed, 19 Oct 2011 12:40:20 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1972</guid>
		<description><![CDATA[Av Forsman &#38; Bodenfors fick vi i uppdrag att skapa ...]]></description>
			<content:encoded><![CDATA[<p>Av Forsman &amp; Bodenfors fick vi i uppdrag att skapa en takeover-banner för Bonnier Tidskrifter. Bannern gav unga kreatörer en möjlighet att visa upp sig på branschsajten Resumé. Besökare av Resumé kunde själv välja vilken kreatör som skulle uppmärksammas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#bonnier-framtida-uppslag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aftonbladet &#8211; Tidningshjälte</title>
		<link>http://www.x-com.se/produktioner/kampanjer#aftonbladet-tidningshjalte</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#aftonbladet-tidningshjalte#comments</comments>
		<pubDate>Tue, 04 Oct 2011 09:10:27 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1967</guid>
		<description><![CDATA[På uppdrag av reklambyrån Strateg har vi varit med och ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av reklambyrån Strateg har vi varit med och skapat ett spel för Aftonbladet. Spelet riktar sig till återförsäljare av kvällstidningen Aftonbladet och går ut på att hinna fylla upp alla tidningshyllor innan tidningarna tar slut. De 50 bästa butikerna vinner en resa till Istanbul!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#aftonbladet-tidningshjalte/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT &#8211; Hübinette</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-hubinette</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-hubinette#comments</comments>
		<pubDate>Mon, 05 Sep 2011 10:09:59 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1958</guid>
		<description><![CDATA[Vi har gjort banners inför premiären av Hübinette, Karin Hübinettes ...]]></description>
			<content:encoded><![CDATA[<p>Vi har gjort banners inför premiären av Hübinette, Karin Hübinettes egen talkshow på SVT1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-hubinette/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Försäkringskassan- Statusförbättraren</title>
		<link>http://www.x-com.se/produktioner/kampanjer#forsakringskassan-statusforbattraren</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#forsakringskassan-statusforbattraren#comments</comments>
		<pubDate>Tue, 23 Aug 2011 10:58:16 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1928</guid>
		<description><![CDATA[Tillsammans med B-Reel och Garbergs har vi gjort en kampanj ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->Tillsammans med B-Reel och Garbergs har vi gjort en kampanj för Försäkringskassan där du kan få din facebookstatus förbättrad av en kändis eller av en helt okänd kompis.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#forsakringskassan-statusforbattraren/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KLM &#8211; What&#8217;s your inspiration</title>
		<link>http://www.x-com.se/produktioner/kampanjer#klm-whats-your-inspiration</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#klm-whats-your-inspiration#comments</comments>
		<pubDate>Tue, 23 Aug 2011 10:48:06 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1948</guid>
		<description><![CDATA[Tillsammans med AD&#38;D har vi skapat en Facebook-kampanj för flygbolaget ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->Tillsammans med AD&amp;D har vi skapat en Facebook-kampanj för flygbolaget KLM. I kampanjen får användare beskriva vad de inspireras av och ha en chans att få denna dröm uppfylld.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#klm-whats-your-inspiration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Västtrafik &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#vasttrafik-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#vasttrafik-webbplats#comments</comments>
		<pubDate>Tue, 23 Aug 2011 07:27:48 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1916</guid>
		<description><![CDATA[För Forsman &#38; Bodenfors och Västtrafik skapade vi en webbplats ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->För Forsman &amp; Bodenfors och Västtrafik skapade vi en webbplats inför sommaren som ska fungera som en guide för turister. Webbplatsen förklarar hur Göteborgs kollektivtrafik fungerar och informerar bland annat om biljetter och försäljningsställen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#vasttrafik-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bilteknik Motorsport &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#bilteknik-motorsport</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#bilteknik-motorsport#comments</comments>
		<pubDate>Wed, 15 Jun 2011 13:12:47 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1906</guid>
		<description><![CDATA[Inför årets tävlingssäsong i Porsche Carrera Cup och Swedish Racing ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->Inför årets tävlingssäsong i Porsche Carrera Cup och Swedish Racing League gjorde vi om webbplatsen för Bilteknik Motorsport. Webbplatsen bygger på Wordpress som publiceringsverktyg.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#bilteknik-motorsport/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bromma &#8211; Greenzone</title>
		<link>http://www.x-com.se/produktioner/kampanjer#bromma-greenzone</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#bromma-greenzone#comments</comments>
		<pubDate>Mon, 13 Jun 2011 07:38:04 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1892</guid>
		<description><![CDATA[Tillsammans med Spitfire Productions har vi skapat en interaktiv presentation ...]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Tillsammans med Spitfire Productions har vi skapat en interaktiv presentation av Bromma Conquip&#8217;s suite GreenZone.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">GreenZone är en samling applikationer som underlättar underhåll och kontroll av en terminal med lyftok. Presentationen har tagits fram för att fungera både som visuellt material på mässor samt online som enskild websida.</div>
<p>Tillsammans med Spitfire Productions har vi skapat en interaktiv presentation av Bromma Conquip&#8217;s suite GreenZone. GreenZone är en samling applikationer som underlättar underhåll och kontroll av en terminal med lyftok. Presentationen har tagits fram för att fungera både som visuellt material på mässor samt online som enskild webbplats.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#bromma-greenzone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Munktell Science Park &#8211; Redesign</title>
		<link>http://www.x-com.se/produktioner/webbplatser#munktell-science-park</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#munktell-science-park#comments</comments>
		<pubDate>Mon, 13 Jun 2011 07:30:56 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1887</guid>
		<description><![CDATA[Vi har tagit fram en ny webbplats åt Munktell Science ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 13.0px 0.0px; line-height: 19.0px; font: 13.0px Georgia} -->Vi har tagit fram en ny webbplats åt Munktell Science Park som bygger på Wordpress. Hyresgästerna på Munktell Science Park har även tillgång till ett intranät med bokningssystem av mötesrum och listning av företag och personer i huset.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#munktell-science-park/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sofiero &#8211; Ölkungen</title>
		<link>http://www.x-com.se/produktioner/kampanjer#sofiero-olkungen</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#sofiero-olkungen#comments</comments>
		<pubDate>Fri, 10 Jun 2011 13:59:04 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Vinn en fotbollsresa för två till Milano i vår senaste ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->Vinn en fotbollsresa för två till Milano i vår senaste kampanj för Sofiero. Du har chans att vinna resan om du blir Ölkung genom att bjuda dina Facebook-vänner på digital öl. Självklart kan du även dricka ölen som dina vänner bjuder på. Flest poäng vinner! Kampanjen är skapad tillsammans med Teenage Inventors som stått för designen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#sofiero-olkungen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BT &#8211; Säg vad du vill på en helsida</title>
		<link>http://www.x-com.se/produktioner/kampanjer#boras-tidning-sag-vad-du-vill-pa-en-helsida</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#boras-tidning-sag-vad-du-vill-pa-en-helsida#comments</comments>
		<pubDate>Fri, 06 May 2011 09:51:50 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1856</guid>
		<description><![CDATA[Borås Tidning förändras. För att uppmärksamma detta har vi tillsammans ...]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} -->Borås Tidning förändras. För att uppmärksamma detta har vi tillsammans med reklambyrån Mecka tagit fram en kampanjsajt. På kampanjsajten kan man läsa om den nya förbättrade tidningen, men också skapa sin egen helsida som har en chans att publiceras i tidningen den 14 maj.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#boras-tidning-sag-vad-du-vill-pa-en-helsida/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acura &#8211; Join S.H.I.E.L.D.</title>
		<link>http://www.x-com.se/produktioner/kampanjer#acura-join-s-h-i-e-l-d</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#acura-join-s-h-i-e-l-d#comments</comments>
		<pubDate>Tue, 26 Apr 2011 14:35:14 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Tillsammans med B-Reel i Los Angeles har vi producerat en ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med B-Reel i Los Angeles har vi producerat en kampanjsajt för biltillverkaren <a href="http://www.acura.com">Acura</a> (Hondas amerikanska varumärke). Acura är officiell bil i <a href="http://thor.marvel.com">Marvels senaste film om Thor</a>. På sajten får du se de specialutrustade bilarna och testa hur det är att vara en S.H.I.E.L.D. agent. Har du vad som krävs? Gå in och testa nu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#acura-join-s-h-i-e-l-d/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twentieth Century Fox &#8211; Big Mommas</title>
		<link>http://www.x-com.se/produktioner/kampanjer#twentieth-century-fox-big-mommas</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#twentieth-century-fox-big-mommas#comments</comments>
		<pubDate>Mon, 07 Mar 2011 14:03:03 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1824</guid>
		<description><![CDATA[Inför biopremiären av Big Mommas: Sådan far, sådan son, har ...]]></description>
			<content:encoded><![CDATA[<p>Inför biopremiären av Big Mommas: Sådan far, sådan son, har vi skapat en kampanj för den svenska distributören av Twentieth Century Fox. På kampanjsidan, som ligger på Bilddagboken, kan besökare göra en egen &#8220;Big Mommas Makeover&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#twentieth-century-fox-big-mommas/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Göteborgs Universitet &#8211; Historieboken</title>
		<link>http://www.x-com.se/produktioner/kampanjer#goteborgs-universitet-historiaboken</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#goteborgs-universitet-historiaboken#comments</comments>
		<pubDate>Fri, 25 Feb 2011 08:16:32 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1813</guid>
		<description><![CDATA[Tillsammans med reklambyrån Mecka från Borås har vi skapat en ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Mecka från Borås har vi skapat en kampanj för Göteborgs universitet. I kampanjen kan du skriva in dig i historieboken bland andra stora upptäckare. Kampanjen vill uppmärksamma de naturvetenskapliga utbildningar som finns på Göteborgs universitet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#goteborgs-universitet-historiaboken/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vi söker webbprogrammerare!</title>
		<link>http://www.x-com.se/aktuellt/vi-soker-webbprogrammerare.html</link>
		<comments>http://www.x-com.se/aktuellt/vi-soker-webbprogrammerare.html#comments</comments>
		<pubDate>Mon, 31 Jan 2011 13:19:57 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1806</guid>
		<description><![CDATA[Just nu jobbar vi för högtryck och känner att det ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1086" title="x-com-meeting" src="/wp-content/uploads/2010/05/x-com-meeting.jpg" alt="x-com-meeting" width="300" height="294" />Just nu jobbar vi för högtryck och känner att det inte skulle skada med lite förstärkning. Vi är alltid intresserade av att komma i kontakt med duktiga personer med olika kompetenser, men den här gången är vi speciellt intresserade av en webbprogrammerare.</p>
<h2>Webbprogrammerare</h2>
<p>- <a href="http://www.x-com.se/wp-content/uploads/2011/01/webbprogrammerare_110131.pdf" target="_blank">Läs mer om tjänsten här.</a></p>
<p>Vi ser fram emot din ansökan!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vi-soker-webbprogrammerare.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>God jul &amp; gott nytt år</title>
		<link>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar-2.html</link>
		<comments>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar-2.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 12:48:45 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1760</guid>
		<description><![CDATA[Ännu ett händelserikt år börjar nu att närma sig sitt ...]]></description>
			<content:encoded><![CDATA[<p><img style="border: 0;" src="http://www.x-com.se/wp-content/uploads/2010/12/jultavla.png" alt="God Jul &amp; Gott Nytt År!" title="God Jul &amp; Gott Nytt År!" width="332" height="221" class="alignright size-full wp-image-1792" />Ännu ett händelserikt år börjar nu att närma sig sitt slut. Vi vill därför passa på att sammanfatta några av de händelser som år 2010 har bjudit på. </p>
<p>Kort efter nyårsraketerna smällde inledde vi året med att flytta kontoret till en ny fräsch lokal en vanlig februaridag. Under den grönskande våren fortsatte vi sedan med att helhjärtat producera kampanjer, koda och lära oss nya tekniker för att utveckla vår kompetens.</p>
<p>I takt med att sommarvärmen kom började vi passande nog att arbeta med flera kända varumärken inom dryckesbranschen (Pago, Brämhults, Coca-Cola, Gevalia). Strax efter detta lanserande vi vår första iPhoneapp. Efter en skön sommarvila och redo för en ny arbetsperiod förstärkte vi sedan vårt team genom att rekrytera vår första tjej. </p>
<p>Därefter, inför den stundande hösten, då vi hade vår mest intensiva period blev X-Com väl omnämnt i tidningar runt om i landet då vi med Per i spetsen blev utsedda till Årets Företagare i Sörmland 2010. Som avslutning efter advent och Lucia tyckte vi det var dags att släppa loss och göra något annat skoj. Resultatet blev en <a href="http://www.x-com.se/minipingiscupen" target="_blank">minipingisturnering</a> som redan efter första upplagan har blivit en tradition. </p>
<p>Som avslutning på det här året vill vi passa på att tacka alla nya och gamla kunder, vänner och medarbetare som har bidragit till ett härligt år. Vi hoppas på att få se er igen i vår! </p>
<p>God Jul &#038; Gott Nytt År!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brämhults &#8211; &#8220;Oh my darling Clementine&#8221;</title>
		<link>http://www.x-com.se/produktioner/kampanjer#bramhults-oh-my-darling</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#bramhults-oh-my-darling#comments</comments>
		<pubDate>Thu, 16 Dec 2010 12:58:39 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1745</guid>
		<description><![CDATA[Tillsammans med Volontaire har vi skapat en ny kampanj för ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Volontaire har vi skapat en ny kampanj för Brämhults där kören, The Sweptaways, har fått tolka den klassiska &#8220;Oh my darling Clementine&#8221;. Gå in, sjung och gör din egen version av denna låt och vinn juice för ett helt år!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#bramhults-oh-my-darling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archus Arkitekter &#8211; Redesign</title>
		<link>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-redesign</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-redesign#comments</comments>
		<pubDate>Thu, 16 Dec 2010 11:11:58 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1740</guid>
		<description><![CDATA[Archus Arkitekter i Västerås önskade uppdatera sin hemsida. Vi tog ...]]></description>
			<content:encoded><![CDATA[<p>Archus Arkitekter i Västerås önskade uppdatera sin hemsida. Vi tog hand om det tekniska och har bland annat använt den nya video-tagen i HTML5 till videouppspelning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-redesign/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X-Com + HTML5 + CSS3 = Äntligen!</title>
		<link>http://www.x-com.se/aktuellt/x-com-html5-css3-antligen.html</link>
		<comments>http://www.x-com.se/aktuellt/x-com-html5-css3-antligen.html#comments</comments>
		<pubDate>Thu, 16 Dec 2010 10:47:05 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1736</guid>
		<description><![CDATA[Vi gillar nya tekniker och nu har vi testat på ...]]></description>
			<content:encoded><![CDATA[<p>Vi gillar nya tekniker och nu har vi testat på nya HTML5 i två olika projekt. För vår kund Archus Arkitekter har vi implementerat en videospelare i HTML5 i samband med en liten redesign av deras webbplats. De som surfar in på sajten med iPhone eller sin nyinköpta iPad kan nu även se video där.</p>
<p><a href="http://www.archus.se/" target="_blank">Se nya archus.se här</a></p>
<p>Det gav oss mersmak och för att testa tekniken ännu mer och även lägga till nya CSS3 gjorde vi ett memoryspel som du kan läsa mer om här: <a href="http://www.x-com.se/labs/html5/memory-game.html">http://www.x-com.se/labs/html5/memory-game.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/x-com-html5-css3-antligen.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory Game</title>
		<link>http://www.x-com.se/labs/html5/memory-game.html</link>
		<comments>http://www.x-com.se/labs/html5/memory-game.html#comments</comments>
		<pubDate>Fri, 26 Nov 2010 13:56:02 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1648</guid>
		<description><![CDATA[
if(RegExp(" AppleWebKit/").test(navigator.userAgent))
{
document.write('');
}
else {
document.write('');
}

First of all, I&#8217;m mainly a web designer, ...]]></description>
			<content:encoded><![CDATA[<p><script>
if(RegExp(" AppleWebKit/").test(navigator.userAgent))
{
document.write('<br/><iframe style="border: 1px solid #d1d1d1; background: #fff; padding: 2px;" src="http://www.x-com.se/xcom-labs/html5/memory/index.html" width="600" height="450" scrolling="no" frameborder="0" border="0"></iframe>');
}
else {
document.write('<br/><img src="/wp-content/uploads/2010/11/only-webkit.jpg" />');
}
</script></p>
<p>First of all, I&#8217;m mainly a web designer, but I was curious about all the buzz surrounding HTML5 and CSS3 so I decided to do a little project.</p>
<p>In this project I made the classic memory game where you have to turn cards and find pairs. The purpose of this project was to test out the basic HTML5 layout with the built in audio tag and some nifty animations with transition in CSS3. Therefore the game only works with modern webkit browsers like Safari and Chrome.</p>
<p><span id="more-1648"></span></p>
<h2>HTML</h2>
<p>Let&#8217;s start with the HTML layout. Here I have used the following new HTML5 tags: doctype, header, section, footer and audio. The rest is pretty basic with an unordered list for the cards.</p>
<p>The reason for using two audio tags with different id&#8217;s is that I didn&#8217;t want any conflict if the user rapidly clicked on two cards. With one audio tag the sound was disrupted.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="sy0">&lt;!</span>DOCTYPE html<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;</span>html<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;</span>head<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>meta http<span class="sy0">-</span>equiv<span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> content<span class="sy0">=</span><span class="st0">&quot;text/html; charset=utf-8&quot;</span><span class="sy0">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>title<span class="sy0">&gt;</span>Memory<span class="sy0">&lt;/</span>title<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>link rel<span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> type<span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> href<span class="sy0">=</span><span class="st0">&quot;css/style.css&quot;</span> <span class="sy0">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>script type<span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> src<span class="sy0">=</span><span class="st0">&quot;scripts/jquery-1.4.2.min.js&quot;</span><span class="sy0">&gt;&lt;/</span>script<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>script type<span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> src<span class="sy0">=</span><span class="st0">&quot;scripts/game.js&quot;</span><span class="sy0">&gt;&lt;/</span>script<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;/</span>head<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;</span>body<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>div id<span class="sy0">=</span><span class="st0">&quot;background-vignett&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>img src<span class="sy0">=</span><span class="st0">&quot;img/vignett.png&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>audio id<span class="sy0">=</span><span class="st0">&quot;flip-sound-1&quot;</span> autobuffer<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>source src<span class="sy0">=</span><span class="st0">&quot;sound/flip-sound.mp3&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>audio<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>audio id<span class="sy0">=</span><span class="st0">&quot;flip-sound-2&quot;</span> autobuffer<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>source src<span class="sy0">=</span><span class="st0">&quot;sound/flip-sound.mp3&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>audio<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>header<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>h1<span class="sy0">&gt;</span>Memory game<span class="sy0">&lt;/</span>h1<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>h2<span class="sy0">&gt;</span>with &nbsp;HTML5<span class="sy0">,</span> CSS3 and jQuery<span class="sy0">&lt;/</span>h2<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>header<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>section<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>ul<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>li <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;card&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>div <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;front&quot;</span><span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>div <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;grey&quot;</span><span class="sy0">&gt;&lt;/</span>div<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>div <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;back&quot;</span><span class="sy0">&gt;&lt;/</span>div<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>li<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8230;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>ul<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>section<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>footer<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>p<span class="sy0">&gt;&lt;</span>span <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;num-turns&quot;</span><span class="sy0">&gt;</span>0<span class="sy0">&lt;/</span>span<span class="sy0">&gt;</span> card<span class="sy0">&lt;</span>span <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;plural&quot;</span><span class="sy0">&gt;</span>s<span class="sy0">&lt;/</span>span<span class="sy0">&gt;</span> flipped in<span class="sy0">&lt;/</span>p<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>p<span class="sy0">&gt;&lt;</span>span <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;time&quot;</span><span class="sy0">&gt;</span><span class="nu0">0</span><span class="sy0">&lt;/</span>span<span class="sy0">&gt;</span> seconds<span class="sy0">&lt;/</span>p<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>footer<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;/</span>body<span class="sy0">&gt;</span><br />
<span class="sy0">&lt;/</span>html<span class="sy0">&gt;</span></div>
</div>
</div>
</div>
<p><br/></p>
<h2>CSS</h2>
<p>I&#8217;ve picked out the most interesting parts in the CSS that uses CSS3 for gradients, shadows and animations. No need to go through all the code.</p>
<p>First we need to initialize start values for the animation for every div in the card class. Here we set duration, easing and hide backface.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;"><span class="re1">.card</span> div <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transition-duration<span class="sy0">:</span> .3s<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transition-timing-function<span class="sy0">:</span> ease-out<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-backface-<span class="kw1">visibility</span><span class="sy0">:</span> <span class="kw2">hidden</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p><br/></p>
<p>Here we style the front and back of the card with border radius, gradients, shadows etc.. Front class also gets a starting value of -180 degrees for the rotation. For back class we don&#8217;t need to apply any starting value for the rotation because the default value is 0 degrees, which is what we want.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;"><span class="re1">.card</span> <span class="re1">.back</span><span class="sy0">,</span> <span class="re1">.card</span> <span class="re1">.front</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">position</span><span class="sy0">:</span> <span class="kw2">absolute</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">top</span><span class="sy0">:</span> <span class="re3">0px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">left</span><span class="sy0">:</span> <span class="re3">0px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">80px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">80px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">background</span><span class="sy0">:</span> <span class="re0">#fff</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span> -moz-border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span> border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.card</span> <span class="re1">.front</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span><span class="sy0">:</span> <span class="nu0">100</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transform<span class="sy0">:</span> rotateY<span class="br0">&#40;</span>-180deg<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.card</span> <span class="re1">.back</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span><span class="sy0">:</span> <span class="nu0">200</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -moz-box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span> -webkit-box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span> box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.card</span> <span class="re1">.back</span> <span class="re1">.graphic</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">position</span><span class="sy0">:</span> <span class="kw2">absolute</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">top</span><span class="sy0">:</span> <span class="re3">5px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">left</span><span class="sy0">:</span> <span class="re3">5px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">70px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">70px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">background</span><span class="sy0">:</span> -moz-linear-gradient<span class="br0">&#40;</span><span class="re3"><span class="nu0">100</span>%</span> <span class="re3"><span class="nu0">100</span>%</span> 90deg<span class="sy0">,</span> <span class="re0">#bdeeee</span><span class="sy0">,</span> <span class="re0">#e0f0f1</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">background</span><span class="sy0">:</span> -webkit-gradient<span class="br0">&#40;</span>linear<span class="sy0">,</span> <span class="re3"><span class="nu0">0</span>%</span> <span class="re3"><span class="nu0">0</span>%</span><span class="sy0">,</span> <span class="re3"><span class="nu0">0</span>%</span> <span class="re3"><span class="nu0">100</span>%</span><span class="sy0">,</span> from<span class="br0">&#40;</span><span class="re0">#bdeeee</span><span class="br0">&#41;</span><span class="sy0">,</span> to<span class="br0">&#40;</span><span class="re0">#e0f0f1</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span> -moz-border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span> border-radius<span class="sy0">:</span> <span class="re3">8px</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p><br/></p>
<p>As you may have noticed in the code above, front class doesn&#8217;t have any shadow applied. That&#8217;s because of one problem I encountered when both front and back of the card had a shadow. Somehow Chrome didn&#8217;t want to hide the backface so I got double set of shadows. Therefore this class below was set if users were using Safari to prevent two instances of shadows in Chrome.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;"><span class="re1">.card</span><span class="re1">.shadow_hack</span> <span class="re1">.front</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -moz-box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span> -webkit-box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span> box-shadow<span class="sy0">:</span> 0 0 <span class="re3">4px</span> <span class="re0">#323232</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p><br/></p>
<p>When users hover the back of a card we add a customhover class with jQuery which animates the card. We also show another shadow to make the illusion of lifting the card from the table.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;"><span class="re1">.card</span><span class="re1">.customhover</span> <span class="re1">.back</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transform<span class="sy0">:</span> scale<span class="br0">&#40;</span>1.1<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-box-shadow<span class="sy0">:</span> <span class="re0">#666</span> 0 <span class="re3">5px</span> <span class="re3">10px</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p><br/></p>
<p>When card is clicked jQuery applies selected class on card and then CSS3 rotates the back object from 0 degrees to 180 degrees on the Y axis, and the front object rotates from -180 degrees to 0 degrees. Both sides of the cards needs to rotate 180 degrees to give a realistic animation.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;"><span class="re1">.selected</span> <span class="re1">.back</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span><span class="sy0">:</span> <span class="nu0">300</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transform<span class="sy0">:</span> rotateY<span class="br0">&#40;</span>180deg<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.selected</span> <span class="re1">.front</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span><span class="sy0">:</span> <span class="nu0">400</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transform<span class="sy0">:</span> rotateY<span class="br0">&#40;</span>0deg<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p><br/></p>
<p>To sum this up. I have encountered some problems in this project when trying to make the backface of the cards hidden. Maybe there is a workaround but Chrome didn&#8217;t seem to work well on that point. Chrome seems also to have difficulties to render graphic that is rotated. Graphics look allot smoother in Safari. I have also experienced that the sound may be out of sync sometimes.</p>
<p>Feel free to download all the code and play around.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/html5/memory-game.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WaterFX &#8211; a much faster solution</title>
		<link>http://www.x-com.se/labs/flash/waterfx-a-much-faster-solution.html</link>
		<comments>http://www.x-com.se/labs/flash/waterfx-a-much-faster-solution.html#comments</comments>
		<pubDate>Mon, 22 Nov 2010 19:55:30 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1613</guid>
		<description><![CDATA[Yes, the previous water effect I introduced is nice, sure, ...]]></description>
			<content:encoded><![CDATA[<p>Yes, the previous water effect I introduced is nice, sure, but it is actually pretty useless as it is eats up way too much processor power. As I still need a fancy effect for my little game I&#8217;m planning I had to come up with something else. Simulate water/light distortion IS not an easy task when it comes to processor power but here is an attempt for 800&#215;600. Let&#8217;s first check the result:</p>
<p><a rel="shadowbox;width=800;height=600" href="/wp-content/uploads/2010/11/Wave2.swf"><img title="WaterFX-2" src="/wp-content/uploads/2010/11/screen.jpg" alt="WaterFX-2" width="600" height="426" /></a></p>
<p>Neat huh? Let&#8217;s dig into the code&#8230;<br />
<span id="more-1613"></span></p>
<p>If you checked my previous lab with water you realize that I am still using the DisplacementFilter. What I have done to increase speed is that I&#8217;ve focused on the bitmapdata that defines the filter. I decided to create a wave-class that is animated and can be used to draw the bitmapdata. I called this class WaveAnim.as &#8211; Let&#8217;s get started!</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">TweenMax</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">easing</span>.<span class="me1">Linear</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Bitmap</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BitmapData</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BlendMode</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> WaveAnim <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> bmpd:BitmapData;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> animWidth:<span class="kw3">Number</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> animHeight:<span class="kw3">Number</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> animSpeed:<span class="kw3">Number</span> = <span class="nu0">2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> wave1:Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> wave2:Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> WaveAnim<span class="br0">&#40;</span>bmpd:BitmapData,animWidth:<span class="kw3">Number</span>,animHeight:<span class="kw3">Number</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">bmpd</span> = bmpd;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">animWidth</span> = animWidth;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">animHeight</span> = animHeight;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave1 = <span class="kw2">new</span> Sprite<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave2 = <span class="kw2">new</span> Sprite<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// determine amount tiles to cover the whole area AND be able to anim one tile.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> numX:<span class="kw3">int</span> = <span class="kw3">Math</span>.<span class="kw3">ceil</span><span class="br0">&#40;</span>animWidth<span class="sy0">/</span>bmpd.<span class="kw3">width</span><span class="br0">&#41;</span>+1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> numY:<span class="kw3">int</span> = <span class="kw3">Math</span>.<span class="kw3">ceil</span><span class="br0">&#40;</span>animHeight<span class="sy0">/</span>bmpd.<span class="kw3">height</span><span class="br0">&#41;</span>+1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> bmp1:Bitmap<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> bmp2:Bitmap<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// creating all tiles and placing them in both wave-sprites.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> j:<span class="kw3">int</span> = <span class="nu0">0</span>;j<span class="sy0">&lt;</span> numY;j++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span> = <span class="nu0">0</span>;i<span class="sy0">&lt;</span> numX;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmp1 = <span class="kw2">new</span> Bitmap<span class="br0">&#40;</span>bmpd<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmp2 = <span class="kw2">new</span> Bitmap<span class="br0">&#40;</span>bmpd<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmp1.<span class="me1">x</span> = bmp2.<span class="me1">x</span> = i<span class="sy0">*</span>bmpd.<span class="kw3">width</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmp1.<span class="me1">y</span> = bmp2.<span class="me1">y</span> = j<span class="sy0">*</span>bmpd.<span class="kw3">width</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave1.<span class="me1">addChild</span><span class="br0">&#40;</span>bmp1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave2.<span class="me1">addChild</span><span class="br0">&#40;</span>bmp2<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// TweenMax rocks as usual. Convenient way to put a </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// colorMatrixFilter on the waves. One RED and one GREEN.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>wave1,0,<span class="br0">&#123;</span>colorMatrixFilter:<span class="br0">&#123;</span>colorize:0xff0000<span class="br0">&#125;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>wave2,0,<span class="br0">&#123;</span>colorMatrixFilter:<span class="br0">&#123;</span>colorize:0&#215;00ff00<span class="br0">&#125;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// now offsetting one wave a little so obvious patterns doesnt appear.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave2.<span class="me1">y</span> = -bmpd.<span class="kw3">height</span><span class="sy0">*</span>.3;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// using the ADD BlendMode makes the Red channel (wave1) visible </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// through the green one (wave2) as the sprites channels are added together.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave2.<span class="me1">blendMode</span> = BlendMode.<span class="kw3">ADD</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>wave1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>wave2<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> startAnim<span class="br0">&#40;</span>speed:<span class="kw3">Number</span>=-1<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>speed <span class="sy0">!</span>= -1<span class="br0">&#41;</span>animSpeed = speed;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Tween both waves to scroll horizontally. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Wave1 to the right and Wave2 to the left. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// restarts itself when done (reseting initial positions)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>wave1,animSpeed,<span class="br0">&#123;</span>startAt:<span class="br0">&#123;</span>x:-bmpd.<span class="kw3">width</span><span class="br0">&#125;</span>,x:0,ease:Linear.<span class="me1">easeNone</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>wave2,animSpeed,<span class="br0">&#123;</span>startAt:<span class="br0">&#123;</span>x:0<span class="br0">&#125;</span>,x:-bmpd.<span class="kw3">width</span>,ease:Linear.<span class="me1">easeNone</span>,onComplete:startAnim<span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> stopAnim<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">killAll</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>WaveAnim is taking a bitmapdata, copying it into two layers (one green and one red) and scrolling them horizontally towards each other.<br />
The reason why I am colouring the sprites is that the DisplacementFilter will check the colourchannels and red will control all pixels vertically meanwhile the green channel controls the waterpixels vertically (pushes them back and forth).<br />
In this little lab I decided to use this texture, my collegue thought it was way too many waves in it so I added some &#8220;blank&#8221; areas to calm the water down occassionally.<br />
<img src="http://www.x-com.se/wp-content/uploads/2010/11/wave.jpg" alt="Bitmapdata for WaveAnim" /></p>
<p>To make the water a little more alive and also to showcase that you can add anything on top on the WaveAnim I decided to create a simple class extending this Sprite:<br />
<img src="http://www.x-com.se/wp-content/uploads/2010/11/Bild-1.png" alt="Drop" /><br />
The Sprite is animating itself and in the end also removing itself from the displaylist afterwards. Here&#8217;s that little class:</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">TweenLite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Drop <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Drop<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scaleX = scaleY = .1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alpha = .7;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenLite.<span class="me1">to</span><span class="br0">&#40;</span><span class="kw3">this</span>,2,<span class="br0">&#123;</span>alpha:0,scaleX:.6,scaleY:.6,onComplete:destroy<span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> destroy<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">parent</span>.<span class="me1">removeChild</span><span class="br0">&#40;</span><span class="kw3">this</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Now the only thing to do is to put these classes together and use them in a DisplacementFilter. I do that in the document class Wave2.as (as this is my second attempt). I give you the code first and will comment some afterwards:</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Bitmap</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BitmapData</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BitmapDataChannel</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BlendMode</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="kw3">MovieClip</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">MouseEvent</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">filters</span>.<span class="me1">DisplacementMapFilter</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Matrix</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Wave2 <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">static</span> <span class="kw3">public</span> <span class="kw2">var</span> WATER_WIDTH:<span class="kw3">Number</span> = <span class="nu0">620</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">static</span> <span class="kw3">public</span> <span class="kw2">var</span> WATER_HEIGHT:<span class="kw3">Number</span> = <span class="nu0">600</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> pondBmp:Bitmap<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> waveAnim:WaveAnim<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> bWave:BitmapData<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> filter:DisplacementMapFilter<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> counter:<span class="kw3">Number</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Wave2<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// adding the background to the stage.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pondBmp = <span class="kw2">new</span> Bitmap<span class="br0">&#40;</span><span class="kw2">new</span> Pond<span class="br0">&#40;</span>0,0<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>pondBmp<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// create the bitmapdata to use as a filtersource.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bWave = <span class="kw2">new</span> BitmapData<span class="br0">&#40;</span>WATER_WIDTH,WATER_HEIGHT<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Decomment row below to see what the bitmapdata actually looks like in action.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//addChild(new Bitmap(bWave));</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filter = <span class="kw2">new</span> DisplacementMapFilter<span class="br0">&#40;</span>bWave,<span class="kw2">null</span>,BitmapDataChannel.<span class="me1">GREEN</span>,BitmapDataChannel.<span class="me1">RED</span>,40,-40<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// create our new WaveAnim.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waveAnim = <span class="kw2">new</span> WaveAnim<span class="br0">&#40;</span><span class="kw2">new</span> WaveBmpd<span class="br0">&#40;</span>0,0<span class="br0">&#41;</span>,WATER_WIDTH,WATER_HEIGHT<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waveAnim.<span class="me1">startAnim</span><span class="br0">&#40;</span>10<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Addin a static image over the pond.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> pondTop:Sprite = <span class="kw2">new</span> TopPond<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>pondTop<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// listener for mouseclick &#8211; adding a drop in the water.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pondTop.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_DOWN</span>,mouseIsDown<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">ENTER_FRAME</span>,onTick<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> mouseIsDown<span class="br0">&#40;</span><span class="kw3">e</span>:MouseEvent<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// drop where mouse is now!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> drop:Drop = <span class="kw2">new</span> Drop<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drop.<span class="me1">x</span> = mouseX<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drop.<span class="me1">y</span> = mouseY<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waveAnim.<span class="me1">addChild</span><span class="br0">&#40;</span>drop<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> addDrop<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// add a random drop in water.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> drop:Drop = <span class="kw2">new</span> Drop<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drop.<span class="me1">x</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>WATER_WIDTH;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drop.<span class="me1">y</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>WATER_HEIGHT;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waveAnim.<span class="me1">addChild</span><span class="br0">&#40;</span>drop<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> onTick<span class="br0">&#40;</span><span class="kw3">e</span>:Event<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// just adding a few drops in the water (every sixth frame);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter+=<span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>counter <span class="sy0">&gt;</span> 5<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addDrop<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// draw a new bmpd-copy of the waveAnim and use it in the filter.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bWave.<span class="me1">lock</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bWave.<span class="me1">draw</span><span class="br0">&#40;</span>waveAnim<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filter.<span class="me1">mapBitmap</span> = bWave;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pondBmp.<span class="me1">filters</span> = <span class="br0">&#91;</span>filter<span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bWave.<span class="me1">unlock</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">// unlocks the bitmapdata again. &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>For this sample I used this image as a source for the waves:<br />
<img src="http://www.x-com.se/wp-content/uploads/2010/11/pond.jpg" alt="Background for Wave2" /><br />
And on top of all I created a &#8220;masked&#8221; image that is not affected by the water so it gives the illusion that only the water inside the pond is moving.<br />
<img src="http://www.x-com.se/wp-content/uploads/2010/11/pondTop.jpg" alt="Overlay for Wave2" /></p>
<p>If you haven&#8217;t discovered TweenMax yet, just go get it at: <a href="http://www.greensock.com/">http://www.greensock.com/</a> .. its a must-have for all flashdevelopers.<br />
Have fun!</p>
<p>/Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/waterfx-a-much-faster-solution.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nominerade i 100-wattaren</title>
		<link>http://www.x-com.se/aktuellt/nominerade-i-100-wattaren.html</link>
		<comments>http://www.x-com.se/aktuellt/nominerade-i-100-wattaren.html#comments</comments>
		<pubDate>Wed, 17 Nov 2010 09:51:58 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1545</guid>
		<description><![CDATA[Nu är nomineringarna inför årets upplaga av reklamtävlingen 100-wattaren är ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.100wattaren.com" target="_blank"><img class="alignright size-full wp-image-1557" style="border: 0;" title="100w" src="http://www.x-com.se/wp-content/uploads/2010/11/100w.jpg" alt="100w" width="300" height="198" /></a>Nu är nomineringarna inför årets upplaga av reklamtävlingen 100-wattaren är klara. Vi kan stolt meddela att vi tillsammans med <a href="http://www.bramhults.se" target="_blank">Brämhults</a> och <a href="http://www.volontaire.se" target="_blank">Volontaire</a> är nominerade i kategorin <em>Smartreklam </em>för kampanjen <em>Hemsida med kort hållbarhet. </em>I nomineringen kan man bland annat läsa att den innovativa funktionaliteten har ökat genomslagskraften hos målgruppen med 30% och bidragit till Brämhults förstaplacering i undersökningen Brilliant Brands, framför varumärken som Apple och Nike.</p>
<p><a href="http://www.100wattaren.com" target="_blank">100-wattaren</a> är en reklamtävling som premierar reklamkampanjer som fungerar. Tävlingen arrangeras av <a href="http://www.annons.se" target="_blank">Sveriges Annonsörer</a> och <a href="http://www.reklam.se">Sveriges Kommunikationsbyråer</a>. Den 9 december sker prisutdelningen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/nominerade-i-100-wattaren.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minipingiscupen 2010</title>
		<link>http://www.x-com.se/aktuellt/minipingiscupen-2010.html</link>
		<comments>http://www.x-com.se/aktuellt/minipingiscupen-2010.html#comments</comments>
		<pubDate>Tue, 16 Nov 2010 20:59:50 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1540</guid>
		<description><![CDATA[Som ni säkert vet vid det här laget så har ...]]></description>
			<content:encoded><![CDATA[<p><img style="border: 0;" class="alignright size-full wp-image-1086" title="Minipingiscupen 2010" src="/wp-content/uploads/2010/11/minipingiscupen.jpg" alt="Minipingiscupen 2010" width="300" height="266" />Som ni säkert vet vid det här laget så har vi ett pingisrum på kontoret. Nästan varje lunch lirar vi lite pingis för att rensa hjärnan och röra lite på kroppen. Då föddes idén att utmana andra företag. Tillsammans med våra vänner på Munktell Science Park har vi dragit igång en minipingisturnering som är tänkt att gå av stapeln torsdagen den 16 december. Vi hoppas att så många som möjligt tar chansen att utmana oss.</p>
<p>Läs mer om tävlingen och anmäl ditt lag här: <a href="http://www.x-com.se/minipingiscupen/" target="_blank">Anmäl ett lag till Minipingiscupen &#8211; Vinn en hög med julklappar!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/minipingiscupen-2010.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT &#8211; Ung &amp; Bortskämd</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-ung-bortskamd</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-ung-bortskamd#comments</comments>
		<pubDate>Tue, 09 Nov 2010 13:20:58 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1395</guid>
		<description><![CDATA[I SVT:s nya dokusåpa följer vi tio bortskämda ungdomar som ...]]></description>
			<content:encoded><![CDATA[<p>I SVT:s nya dokusåpa följer vi tio bortskämda ungdomar som samlas i ett hus för att pröva på vuxen- och vardagsliv. Den som tar minst ansvar i huset röstas sedan ut av de egna föräldrarna. Inför premiären av denna serie har vi tagit fram webbannonser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-ung-bortskamd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Systembolaget &#8211; Förslagstävling</title>
		<link>http://www.x-com.se/produktioner/kampanjer#systembolaget-forslagstavling</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#systembolaget-forslagstavling#comments</comments>
		<pubDate>Mon, 08 Nov 2010 14:30:17 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1370</guid>
		<description><![CDATA[Har du ett förslag på hur Systembolaget kan förbättras? Då ...]]></description>
			<content:encoded><![CDATA[<p>Har du ett förslag på hur Systembolaget kan förbättras? Då har du chansen att vinna en middag för 8-10 personer lagad av Årets kock hemma i ditt kök. Tillsammans med Forsman &#038; Bodenfors har vi producerat förslagstävlingen på Facebook, men även en kampanjsajt och webbannonser. Den här typen av tävlingar får inte avgöras med hjälp av Facebooks egna infrastruktur så därför fick vi bygga en egen &#8220;Facebookvägg&#8221; inne på en flik på Systembolagets officiella facebooksida. Facebook har väldigt speciella regler och begränsningar på vad man kan och får göra i en flik, men med teknisk kreativitet lyckades vi få till den här lösningen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#systembolaget-forslagstavling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brämhults &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#bramhults-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#bramhults-webbplats#comments</comments>
		<pubDate>Mon, 08 Nov 2010 13:53:55 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1375</guid>
		<description><![CDATA[I samarbete med reklambyrån Volontaire har vi nu lanserat Brämhults ...]]></description>
			<content:encoded><![CDATA[<p>I samarbete med reklambyrån Volontaire har vi nu lanserat Brämhults nya webbplats. Vi står den här gången bakom både design och programmering. Precis som tidigare kommer Brämhults, i enlighet med juicernas hållbarhet, att kunna byta utseende var 18:e dag.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#bramhults-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peab &#8211; Norden runt</title>
		<link>http://www.x-com.se/produktioner/kampanjer#peab-norden-runt</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#peab-norden-runt#comments</comments>
		<pubDate>Fri, 05 Nov 2010 08:02:33 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1359</guid>
		<description><![CDATA[Sugen på att resa? Just nu kan du vara med ...]]></description>
			<content:encoded><![CDATA[<p>Sugen på att resa? Just nu kan du vara med och tävla om en Nordenruntresa! Tillsammans med Hilanders, som stått för designen, har vi skapat en tävling för Peab. Tävlingen går ut på att du ska gissa vart olika byggnader är placerade runt om i Norden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#peab-norden-runt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nominerade till Årets Företagare i Sverige 2010</title>
		<link>http://www.x-com.se/aktuellt/nominerade-till-arets-foretagare-i-sverige-2010.html</link>
		<comments>http://www.x-com.se/aktuellt/nominerade-till-arets-foretagare-i-sverige-2010.html#comments</comments>
		<pubDate>Tue, 19 Oct 2010 07:24:37 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1244</guid>
		<description><![CDATA[Vi är ett steg närmare att bli &#8220;Årets Företagare i ...]]></description>
			<content:encoded><![CDATA[<p><img style="border: 0;" class="alignright size-full wp-image-1086" title="Årets Företagare i Sverige 2010" src="/wp-content/uploads/2010/10/aretsforetagare.jpg" alt="Årets Företagare i Sverige 2010" width="300" height="198" />Vi är ett steg närmare att bli &#8220;Årets Företagare i Sverige 2010&#8243; som utses av Företagarna. Idag fick vi reda på att vi har gått vidare i regionen och är ett av 21 företag som har chansen att vinna. Det hela avgörs på en gala i Stockholm den 12 november. Spännande!</p>
<p>Läs mer om tävlingen här:<br/><a href="http://www.foretagarna.se/Om-foretagarna/Arets-Foretagare/Arets-Foretagare-i-Sverige/Arets-Foretagare-i-Sverige-2010/" target="_blank">Årets Företagare i Sverige 2010 &#8211; Företagarna</a></p>
<p>Artikel i Eskilstuna Kuriren:<br/><a href="http://ekuriren.se/nyheter/sormland/1.842220-vd-for-x-com-blir-arets-foretagare" target="_blank">VD för X-Com blir Årets Företagare i Sörmland</a></p>
<p>Artikel i Folket: <a href="http://folket.se/folkifolket/1.842443" target="_blank">Årets Företagare i Sörmland</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/nominerade-till-arets-foretagare-i-sverige-2010.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT &#8211; Våra Vänners Liv Webbannonser</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-vara-vanners-liv-webbannons</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-vara-vanners-liv-webbannons#comments</comments>
		<pubDate>Mon, 18 Oct 2010 11:26:55 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1321</guid>
		<description><![CDATA[Våra vänners liv är en ny dramaserie som sänds på ...]]></description>
			<content:encoded><![CDATA[<p>Våra vänners liv är en ny dramaserie som sänds på SVT1, måndagar 21.00. I denna feelgoodserie kommer vi följa fyra vänner i 40-årsåldern. Huvudrollerna spelas av Gustaf Hammarsten, Shanti Roney, Erik Johansson och Jacob Ericksson. Inför premiären har vi hjälpt SVT med att ta fram webbannonser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-vara-vanners-liv-webbannons/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Westermo &#8211; Produktlansering Webbannonser</title>
		<link>http://www.x-com.se/produktioner/kampanjer#westermo-produktlansering-webbannonser</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#westermo-produktlansering-webbannonser#comments</comments>
		<pubDate>Wed, 13 Oct 2010 15:19:03 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[För Westermo har vi skapat webbannonser inför lanseringen av deras ...]]></description>
			<content:encoded><![CDATA[<p>För Westermo har vi skapat webbannonser inför lanseringen av deras nya  produkt, Falcon. Detta är en av världens första verkligt industriella  VDSL2-router. För den här kampanjen valde vi att skapa en nedräknare för  att öka spänningen inför releasen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#westermo-produktlansering-webbannonser/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tele2 &#8211; Idol Quiz 2010</title>
		<link>http://www.x-com.se/produktioner/spel#tele2-idol-quiz-2010</link>
		<comments>http://www.x-com.se/produktioner/spel#tele2-idol-quiz-2010#comments</comments>
		<pubDate>Sun, 10 Oct 2010 13:25:59 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Vi har vidareutvecklat Tele2 &#8211; Playlist Quiz så att det ...]]></description>
			<content:encoded><![CDATA[<p>Vi har vidareutvecklat Tele2 &#8211; Playlist Quiz så att det numera är enkelt för Tele2 och deras partners att skapa quizar med olika tema. De har stora friheter grafiskt att branda om gränssnittet för ett speciellt tema och hantera priser till vinnarna. Första temat är för Idol där spelarna kan vinna biljetter till finalen i Globen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#tele2-idol-quiz-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT &#8211; The Event Webbannonser</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-the-event-webbannonser</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-the-event-webbannonser#comments</comments>
		<pubDate>Sun, 26 Sep 2010 14:58:53 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[SVT sänder amerikanska NBC:s senaste storsatsning The Event endast sex ...]]></description>
			<content:encoded><![CDATA[<p>SVT sänder amerikanska NBC:s senaste storsatsning The Event endast sex dagar efter den amerikanska premiären, något som aldrig tidigare gjorts. Vi har hjälpt SVT att ta fram webbannonser inför premiären.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-the-event-webbannonser/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Länsförsäkringar Bergslagen &#8211; Biljettsystem</title>
		<link>http://www.x-com.se/produktioner/ovrigt#lansforsakringar-bergslagen-biljettsystem</link>
		<comments>http://www.x-com.se/produktioner/ovrigt#lansforsakringar-bergslagen-biljettsystem#comments</comments>
		<pubDate>Fri, 24 Sep 2010 13:00:36 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Övrigt]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Länsförsäkringar Bergslagen sponsrar många lokala föreningar och evenemang. Som motprestation ...]]></description>
			<content:encoded><![CDATA[<p>Länsförsäkringar Bergslagen sponsrar många lokala föreningar och evenemang. Som motprestation får de ofta biljetter till olika evenemang och dessa vill de på ett snabbt, enkelt och smidigt sätt kunna erbjuda till sina kunder. Vi tog fram ett system som uppfyller dessa önskemål och som nu gör hanteringen mycket enklare för både Länsförsäkringar Bergslagen och deras kunder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/ovrigt#lansforsakringar-bergslagen-biljettsystem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citykonferensen &#8211; Pekskärmar</title>
		<link>http://www.x-com.se/produktioner/ovrigt#citykonferensen-pekskarmar</link>
		<comments>http://www.x-com.se/produktioner/ovrigt#citykonferensen-pekskarmar#comments</comments>
		<pubDate>Wed, 01 Sep 2010 12:24:13 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Övrigt]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[På Citykonferensen i Stockholm hänger det nu fyra skärmar med ...]]></description>
			<content:encoded><![CDATA[<p>På Citykonferensen i Stockholm hänger det nu fyra skärmar med touch screen där konferensdeltagarna bjuds på olika tankenötter. Tillsammans med reklambyrån Ruth har vi tagit fram applikationen som körs på skärmarna och WR-IT har hjälpt oss med monteringen av skärmarna. Hela projektet är en del av Citykonferensens nyrenovering och samarbete med Tekniska Museet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/ovrigt#citykonferensen-pekskarmar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SmokeFX &#8211; An experiment with Bezier Curves</title>
		<link>http://www.x-com.se/labs/flash/smokefx-an-experiment-with-bezier-curves.html</link>
		<comments>http://www.x-com.se/labs/flash/smokefx-an-experiment-with-bezier-curves.html#comments</comments>
		<pubDate>Thu, 26 Aug 2010 11:33:30 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bezier]]></category>
		<category><![CDATA[beziercurves]]></category>
		<category><![CDATA[colourcurves]]></category>
		<category><![CDATA[curve]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[smoke]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1222</guid>
		<description><![CDATA[Since the dawn of the computer people has always created ...]]></description>
			<content:encoded><![CDATA[<p>Since the dawn of the computer people has always created colourful art using curves. Either they have moved around on the screen or just being drawn with small adjustments creating mesmerizing patterns.<br />
Being inspired by the latest PS3 boot menu I decided to create a nice looking (and dynamic) effect using Bezier curves. Here&#8217;s the treat:<br />
<a rel="shadowbox;width=900;height=450" href="/wp-content/uploads/2010/08/colourCurves.swf"><img title="ColourCurves" src="/wp-content/uploads/2010/08/colourCurves_preview.png" alt="ColourCurves" width="600" height="340" /></a></p>
<p><span id="more-1222"></span><br />
Now, from start, there is a problem here. AS3 doesn&#8217;t support more than one control point (via the curveTo() method). To be a able to draw nice continuous curves we need 2 control points (Cubic Bezier).</p>
<p>Luckily I don&#8217;t have to worry about that as I could find <a href="http://www.cartogrammar.com/blog/actionscript-curves-update/">this great class</a> taking care of all that math I lost out as a very happy but maybe not so focused student. Wonderful! Most of the work done already, let&#8217;s put it to use!</p>
<p>I decided to divide the whole effect into 3 classes.</p>
<p><strong>WaveData</strong> &#8211; Holding all the data about the wave including controlpoint-position. The Class is also controlling the logical animation of the controlpoints + the colour of the wave, using our beloved tweenengine <a href="http://www.greensock.com/tweenmax/">TweenMax</a>.</p>
<p><strong>Wave</strong> &#8211; Being the DisplayObject that is the actual visual representation of the WaveData (being a SINGLE wave that is)</p>
<p><strong>Canvas</strong> &#8211; This is the area that will be visual on the screen. All Waves are draw to the canvas and a few pretty effects are added to the canvas. We&#8217;ll get to that.</p>
<p>Now let&#8217;s get started with the WaveData:</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">TweenMax</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">easing</span>.<span class="me1">Sine</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Point</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> WaveData<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> controlPoints:<span class="kw3">int</span> = 7<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> minRadius:<span class="kw3">Number</span> = <span class="nu0">0.1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> maxRadius:<span class="kw3">Number</span>= <span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> waveAlpha:<span class="kw3">Number</span> = 0.08<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> lineWidth:<span class="kw3">Number</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> minSpeed:<span class="kw3">Number</span> = <span class="nu0">5</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> maxSpeed:<span class="kw3">Number</span> = <span class="nu0">8</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> <span class="kw3">color</span>:<span class="kw3">int</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> aPoints:<span class="kw3">Array</span>&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// no constructor needed. Best practise?? Naah, maybe not but hey, I get to write a comment instead of a constructor.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// resets the wavedata and starts the animation of the controlpoints and the wavecolour.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> reset<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> y:<span class="kw3">Number</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> p:Point;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aPoints = <span class="br0">&#91;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// create all controlpoints and place them within the radius. They all starts at x:0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span> = <span class="nu0">0</span>;i<span class="sy0">&lt;</span>controlPoints;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y = 2<span class="sy0">*</span><span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="br0">&#40;</span>maxRadius-minRadius<span class="br0">&#41;</span>+minRadius<span class="br0">&#41;</span>-maxRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = <span class="kw2">new</span> Point<span class="br0">&#40;</span>0,y<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aPoints.<span class="kw3">push</span><span class="br0">&#40;</span>p<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startAnim<span class="br0">&#40;</span>p<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animColour<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> animColour<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> newColor = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>0xffffff;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span><span class="kw3">this</span>, 9, <span class="br0">&#123;</span>hexColors:<span class="br0">&#123;</span><span class="kw3">color</span>:newColor<span class="br0">&#125;</span>,onComplete:animColour<span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> startAnim<span class="br0">&#40;</span>p:Point<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// no, it&#8217;s not an optimized way to find the point but it&#8217;s a lab, remember? ;)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> ip:<span class="kw3">int</span> = aPoints.<span class="kw3">indexOf</span><span class="br0">&#40;</span>p<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> newY:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="br0">&#40;</span>maxRadius-minRadius<span class="br0">&#41;</span>+minRadius<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// x is being set &quot;somewhat&quot; around the section where it should be.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> newX:<span class="kw3">Number</span> = &nbsp;<span class="br0">&#40;</span>ip==0<span class="br0">&#41;</span>?0:<span class="br0">&#40;</span><span class="br0">&#40;</span>ip<span class="sy0">/</span><span class="br0">&#40;</span>controlPoints-1<span class="br0">&#41;</span>+<span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="br0">&#40;</span>1<span class="sy0">/</span><span class="br0">&#40;</span>controlPoints-1<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">*</span>4<span class="br0">&#41;</span><span class="br0">&#41;</span>-<span class="br0">&#40;</span>2<span class="sy0">*</span><span class="br0">&#40;</span>1<span class="sy0">/</span><span class="br0">&#40;</span>controlPoints-1<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// is the direction of the controlpoint going UP or DOWN?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>p.<span class="me1">y</span> <span class="sy0">&gt;</span> 0<span class="br0">&#41;</span> newY=-newY;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//animate!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>p,<span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="br0">&#40;</span>maxSpeed-minSpeed<span class="br0">&#41;</span><span class="br0">&#41;</span>+minSpeed,<span class="br0">&#123;</span>ease:Sine.<span class="me1">easeInOut</span>,y:newY,x:newX,onComplete:startAnim,onCompleteParams:<span class="br0">&#91;</span>p<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Pay attention to the fact that the controlpoints are just moving between  1 to -1 . This means that they are not having their physical width in here but will be multiplied later on in the Wave-class So let&#8217;s get going. Next class please!</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Point</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Wave <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> waveWidth:<span class="kw3">Number</span> = <span class="nu0">650</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> waveHeight:<span class="kw3">Number</span> = <span class="nu0">150</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> <span class="kw3">data</span>:WaveData<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Wave<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// creates data and starts the animation</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">data</span> = <span class="kw2">new</span> WaveData<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">data</span>.<span class="me1">reset</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> update<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// creating real coordinates from Wave-data controlpoints</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> counter:<span class="kw3">int</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> coord:<span class="kw3">Array</span> = <span class="br0">&#91;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="kw1">each</span><span class="br0">&#40;</span><span class="kw2">var</span> p:Point <span class="kw1">in</span> <span class="kw3">data</span>.<span class="me1">aPoints</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coord.<span class="kw3">push</span> <span class="br0">&#40;</span><span class="kw2">new</span> Point<span class="br0">&#40;</span>p.<span class="me1">x</span><span class="sy0">*</span>waveWidth,p.<span class="me1">y</span><span class="sy0">*</span>waveHeight<span class="br0">&#41;</span><span class="br0">&#41;</span>;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// draw curve</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span class="kw3">clear</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span class="kw3">lineStyle</span><span class="br0">&#40;</span><span class="kw3">data</span>.<span class="me1">lineWidth</span>,<span class="kw3">data</span>.<span class="kw3">color</span>,<span class="kw3">data</span>.<span class="me1">waveAlpha</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CubicBezier.<span class="me1">curveThroughPoints</span><span class="br0">&#40;</span>graphics,coord<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Now the wave is clearly a fully animated wave. If you add this one to the stage you will see a thin line waving around.. but we want more, right? Next class please!</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Bitmap</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BitmapData</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BlendMode</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">filters</span>.<span class="me1">BitmapFilter</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">filters</span>.<span class="me1">BlurFilter</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Matrix</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Point</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Rectangle</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Canvas <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> bmpd:BitmapData<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aWaves:<span class="kw3">Array</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> w:<span class="kw3">int</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> h:<span class="kw3">int</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Canvas<span class="br0">&#40;</span>w:<span class="kw3">int</span> = 900,h:<span class="kw3">int</span> = 450<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// set the width and height of the canvas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">w</span> = w;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">h</span> = h;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aWaves=<span class="br0">&#91;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// adding a bitmap to stage</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpd = <span class="kw2">new</span> BitmapData<span class="br0">&#40;</span>w,h,<span class="kw2">false</span>,0<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> bmp:Bitmap = <span class="kw2">new</span> Bitmap<span class="br0">&#40;</span>bmpd<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>bmp<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> addWave<span class="br0">&#40;</span>wave:Wave<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// adding a wave to the canvas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aWaves.<span class="kw3">push</span><span class="br0">&#40;</span>wave<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> startDraw<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span class="br0">&#40;</span>Event.<span class="me1">ENTER_FRAME</span>,onTick<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> onTick<span class="br0">&#40;</span><span class="kw3">e</span>:Event<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// each wave is now drawn onto the canvas using the ADD Blendmode.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="kw1">each</span> <span class="br0">&#40;</span> <span class="kw2">var</span> wave:Wave <span class="kw1">in</span> aWaves<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wave.<span class="me1">update</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> m:Matrix = <span class="kw2">new</span> Matrix<span class="br0">&#40;</span>1,0,0,1,26,bmpd.<span class="kw3">height</span><span class="sy0">*</span>.5<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpd.<span class="me1">draw</span><span class="br0">&#40;</span>wave,m,<span class="kw2">null</span>,BlendMode.<span class="kw3">ADD</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// the canvas is now blurred out giving a blurred AND transitionout effect.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> filter:BlurFilter = <span class="kw2">new</span> BlurFilter<span class="br0">&#40;</span>3,3<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpd.<span class="me1">applyFilter</span><span class="br0">&#40;</span>bmpd, <span class="kw2">new</span> Rectangle<span class="br0">&#40;</span>0,0,w,h<span class="br0">&#41;</span>,<span class="kw2">new</span> Point<span class="br0">&#40;</span>0,0<span class="br0">&#41;</span>, filter<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// the bitmapdata is now scrolled to the right giving a &quot;moving feeling&quot; to the effect.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpd.<span class="kw3">scroll</span><span class="br0">&#40;</span><span class="nu0">5</span>,<span class="nu0">0</span><span class="br0">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Wow, amazing what a few postfilters can do. Just a blur and a pixelpush to the right does the trick. Now let&#8217;s put this all together in a Main class and try it out:</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Main <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Main<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> c:Canvas = <span class="kw2">new</span> Canvas<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// adding a few waves</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span> = <span class="nu0">0</span>;i <span class="sy0">&lt;</span> <span class="nu0">3</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> w:Wave = <span class="kw2">new</span> Wave<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c.<span class="me1">addWave</span><span class="br0">&#40;</span>w<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>c<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c.<span class="me1">startDraw</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/smokefx-an-experiment-with-bezier-curves.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pago &#8211; Sveriges Bästa Café</title>
		<link>http://www.x-com.se/produktioner/kampanjer#pago-sveriges-basta-cafe</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#pago-sveriges-basta-cafe#comments</comments>
		<pubDate>Wed, 25 Aug 2010 08:05:45 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1213</guid>
		<description><![CDATA[För Spendrups Bryggeri har vi skapat en kampanj för deras ...]]></description>
			<content:encoded><![CDATA[<p>För Spendrups Bryggeri har vi skapat en kampanj för deras premiumjuice Pago. Kampanjen, som ska ligga på bilddagboken, går ut på att kora Sveriges Bästa Café.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#pago-sveriges-basta-cafe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Välkommen Rebecka!</title>
		<link>http://www.x-com.se/aktuellt/valkommen-rebecka.html</link>
		<comments>http://www.x-com.se/aktuellt/valkommen-rebecka.html#comments</comments>
		<pubDate>Mon, 16 Aug 2010 11:59:45 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1211</guid>
		<description><![CDATA[Rebecka Egfors är en frisk fläkt från Kalmar som efter ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1086" title="Rebecka Egfors" src="/wp-content/uploads/2010/10/rebecka_300x214.jpg" alt="Rebecka Egfors" width="300" height="214" />Rebecka Egfors är en frisk fläkt från Kalmar som efter högskolestudierna på Mälardalens Högskola har valt att stanna kvar i Eskilstuna. Det är vi glada för och från och med idag kommer hon jobba som produktionsledare hos oss. Hon ska hjälpa oss att hålla koll på våra projekt och produktioner så att vi gör rätt saker i rätt tid och fortsätter leverera hög kvalité.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/valkommen-rebecka.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X-Com + iPhone = Äntligen!</title>
		<link>http://www.x-com.se/aktuellt/x-com-iphone-antligen.html</link>
		<comments>http://www.x-com.se/aktuellt/x-com-iphone-antligen.html#comments</comments>
		<pubDate>Mon, 09 Aug 2010 15:08:23 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1205</guid>
		<description><![CDATA[Nu har vi äntligen släppt vår första iPhone app. Det ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/se/app/walters-app/id378084678?mt=8"><img style="border: 0;" class="alignright size-full wp-image-1086" title="Walters App" src="/wp-content/uploads/2010/08/waltersapp_300x340.jpg" alt="Walters App" width="300" height="340" /></a>Nu har vi äntligen släppt vår första iPhone app. Det är åt Torshällas stolthet och Sveriges roligaste nörd Walter Kurtsson som vi har tagit fram en iPhone App där du kan se filmer, lyssna på walters låtar, höra hans roliga “telefonluringar” och mycket mer. Den är gratis och du kan <a href="http://itunes.apple.com/se/app/walters-app/id378084678?mt=8">ladda hem Walters App här</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/x-com-iphone-antligen.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Walter Kurtsson &#8211; iPhone App</title>
		<link>http://www.x-com.se/produktioner/appar#walter-kurtsson-iphone-app</link>
		<comments>http://www.x-com.se/produktioner/appar#walter-kurtsson-iphone-app#comments</comments>
		<pubDate>Mon, 09 Aug 2010 14:40:23 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Appar]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Torshällas stolthet och Sveriges roligaste nörd Walter Kurtsson finns nu ...]]></description>
			<content:encoded><![CDATA[<p>Torshällas stolthet och Sveriges roligaste nörd Walter Kurtsson finns nu även i din iPhone. Här kan du se filmer, lyssna på walters låtar, höra hans roliga &#8220;telefonluringar&#8221; och mycket mer. Appen är gratis så ladda hem den nu!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/appar#walter-kurtsson-iphone-app/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realistic water &#8211; Showing off DisplacementMapFilter</title>
		<link>http://www.x-com.se/labs/flash/realistic-water-showing-off-displacementmapfilter.html</link>
		<comments>http://www.x-com.se/labs/flash/realistic-water-showing-off-displacementmapfilter.html#comments</comments>
		<pubDate>Thu, 15 Jul 2010 13:57:39 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[displacementmap]]></category>
		<category><![CDATA[displacementmapfilter]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[water]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1185</guid>
		<description><![CDATA[
Try moving the mouse over the water and maybe click ...]]></description>
			<content:encoded><![CDATA[<p><a rel="shadowbox;width=500;height=300" href="/wp-content/uploads/2010/07/water.swf"><img title="Water" src="/wp-content/uploads/2010/07/water_preview.png" alt="Water" width="600" height="340" /></a><br />
Try moving the mouse over the water and maybe click a few times?</p>
<p>Been playing around with a small idea of a game and for this particular game I would like to have a great top-down watereffect to give a smooth, calm overall feeling.<br />
<span id="more-1185"></span><br />
This was a great way to try out a few new tricks using both the DisplacementMapFilter that has been in Flash for a while and also the lesser known ConvolutionFilter.<br />
The DisplacementMapFilter helps to &#8220;push&#8221; the backgroundpixels in different directions due to the filtercolours which creates the distortion of the background, giving the illusion of the water breaking and distorting the light.<br />
The ConvolutionFilter is normally used to check and alter the neighbouring pixels which in this case is used when the water rings and ripples are growing and &#8220;smoothed&#8221; out. </p>
<p>On top of this, I created a bitmap using PerlinNoise that also distorts the water + gives that nice lighting effect via the SUBTRACT BlendMode.</p>
<p>The result became surprisingly good so I decided to throw it up here right away and will, as soon as I find the time, clean the code out so I can step through it all with you once it&#8217;s done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/realistic-water-showing-off-displacementmapfilter.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tele2 &#8211; Playlist Quiz</title>
		<link>http://www.x-com.se/produktioner/webbplatser#tele2-playlist-quiz</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#tele2-playlist-quiz#comments</comments>
		<pubDate>Wed, 14 Jul 2010 14:52:04 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1147</guid>
		<description><![CDATA[Tele2 Playlist Quiz baseras på Tele2:s nya musiktjänst Playlist som ...]]></description>
			<content:encoded><![CDATA[<p>Tele2 Playlist Quiz baseras på Tele2:s nya musiktjänst <a href="http://playlist.tele2.se">Playlist</a> som erbjuder nerladdning av låtar. Till denna musiktjänst har vi kopplat på en frågesportslek där besökaren själv får spela eller skapa quizar. Självklart kan man även utmana sina vänner på Facebook för att se vem som är bäst på musik!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#tele2-playlist-quiz/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>En vecka stängt i sommar</title>
		<link>http://www.x-com.se/aktuellt/en-vecka-stangt-i-sommar.html</link>
		<comments>http://www.x-com.se/aktuellt/en-vecka-stangt-i-sommar.html#comments</comments>
		<pubDate>Tue, 06 Jul 2010 16:48:55 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1144</guid>
		<description><![CDATA[Denna sommaren kommer vi bara hålla stängt v. 31 (2-6/8) ...]]></description>
			<content:encoded><![CDATA[<p>Denna sommaren kommer vi bara hålla stängt v. 31 (2-6/8) då alla är på semester. Övriga veckor kommer det vara någon på kontoret och från och med v. 33 (16-20/8) är alla tillbaka igen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/en-vecka-stangt-i-sommar.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tenzingpriset &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#tenzingpriset-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#tenzingpriset-webbplats#comments</comments>
		<pubDate>Thu, 01 Jul 2010 11:42:39 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1172</guid>
		<description><![CDATA[Byrån Deasign har stått för design och vi har ansvarat ...]]></description>
			<content:encoded><![CDATA[<p>Byrån Deasign har stått för design och vi har ansvarat för programmering.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#tenzingpriset-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ska vi få vårt första guldlejon?</title>
		<link>http://www.x-com.se/aktuellt/ska-vi-fa-vart-forsta-guldlejon.html</link>
		<comments>http://www.x-com.se/aktuellt/ska-vi-fa-vart-forsta-guldlejon.html#comments</comments>
		<pubDate>Wed, 23 Jun 2010 09:54:23 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1137</guid>
		<description><![CDATA[Just nu pågår reklam-VM i Cannes. En av produktionerna som ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1086" title="cannes-lions-2010" src="/wp-content/uploads/2010/06/cannes_300x225.jpg" alt="Cannes Lions 2010" width="300" height="225" />Just nu pågår reklam-VM i Cannes. En av produktionerna som vi var delaktiga i förra året är med och tävlar om de åtråvärda guldlejonen i kategorin &#8220;Cyber&#8221;. Det är kampanjen <a href="http://www.x-com.se/produktioner#ikea-sveriges-trottaste-tavling">&#8220;IKEA &#8211; Sveriges Tröttaste Tävling&#8221;</a> som vi gjorde tillsammans med Forsman &#038; Bodenfors och B-Reel. På torsdag kväll avgörs det och vi kan inte annat än hoppas att kampanjen faller juryn i smaken.</p>
<p>Läs mer här: <a href="http://www.canneslions.com/work/cyber/entry.cfm?entryid=21663&#038;award=99" target="_blank">Cannes Lions International Advertising Festival</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/ska-vi-fa-vart-forsta-guldlejon.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Länsförsäkringar Älvsborg &#8211; Delägare</title>
		<link>http://www.x-com.se/produktioner/kampanjer#lansforsakringar-alvsborg-delagare</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#lansforsakringar-alvsborg-delagare#comments</comments>
		<pubDate>Mon, 14 Jun 2010 09:49:55 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[Tillsammans med reklambyrån Mecka i Borås har vi tagit fram ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Mecka i Borås har vi tagit fram en kampanjsajt för Länsförsäkringar Älvsborg. De vill lyfta fram att deras kunder även är delägare i bolaget. Den som laddar upp en bild på sig själv och får flest röster vinner sitt porträtt målat i olja av en riktig konstnär.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#lansforsakringar-alvsborg-delagare/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony Ericsson &#8211; Xperia X10 Mini Serie</title>
		<link>http://www.x-com.se/produktioner/kampanjer#sony-ericsson-xperia-x10-mini-serie</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#sony-ericsson-xperia-x10-mini-serie#comments</comments>
		<pubDate>Mon, 14 Jun 2010 09:06:57 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se#</guid>
		<description><![CDATA[I samband med att Sony Ericsson lanserar sin nya Xperia ...]]></description>
			<content:encoded><![CDATA[<p>I samband med att Sony Ericsson lanserar sin nya Xperia X10 Mini har vi både designat och programmerat en kampanjsida som ligger på bilddagboken.se. Den som skapar den mest gillade serien vinner en ny Sony Ericsson Xperia X10 Mini.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#sony-ericsson-xperia-x10-mini-serie/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coca-Cola &#8211; My Longest Celebration</title>
		<link>http://www.x-com.se/produktioner/kampanjer#my-longest-celebration-by-coca-cola</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#my-longest-celebration-by-coca-cola#comments</comments>
		<pubDate>Fri, 11 Jun 2010 09:03:58 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1107</guid>
		<description><![CDATA[Inför fotbolls-VM i Sydafrika har vi både kodat och designat ...]]></description>
			<content:encoded><![CDATA[<p>Inför fotbolls-VM i Sydafrika har vi både kodat och designat en kampanjsida för Coca-Cola. Kampanjsidan kommer finnas på Bilddagboken och går ut på att medlemmarna ska ladda upp bilder på sig själva och sprida glädjen!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#my-longest-celebration-by-coca-cola/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vi behöver bli fler!</title>
		<link>http://www.x-com.se/aktuellt/vi-behover-bli-fler.html</link>
		<comments>http://www.x-com.se/aktuellt/vi-behover-bli-fler.html#comments</comments>
		<pubDate>Fri, 28 May 2010 12:59:34 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1074</guid>
		<description><![CDATA[Just nu jobbar vi för högtryck och känner att det ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1086" title="x-com-meeting" src="/wp-content/uploads/2010/05/x-com-meeting.jpg" alt="x-com-meeting" width="300" height="294" />Just nu jobbar vi för högtryck och känner att det inte skulle skada med lite förstärkning. Vi är alltid intresserade av att komma i kontakt med duktiga personer med olika kompetenser, men den här gången är vi speciellt intresserade av personer med följande profiler:</p>
<h2>Projektledare med säljinriktining</h2>
<p>- <a href="http://www.x-com.se/wp-content/uploads/2010/05/projektledare_100528.pdf" target="_blank">Läs mer om tjänsten här.</a></p>
<h2>Webbprogrammerare</h2>
<p>- <a href="http://www.x-com.se/wp-content/uploads/2010/05/webbprogrammerare_100528.pdf" target="_blank">Läs mer om tjänsten här.</a></p>
<p>Vi ser fram emot din ansökan!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vi-behover-bli-fler.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eskilstuna Innerstad &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#eskilstuna-innerstad-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#eskilstuna-innerstad-webbplats#comments</comments>
		<pubDate>Fri, 28 May 2010 10:22:27 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1059</guid>
		<description><![CDATA[Vi har tagit fram en ny webbplats åt Eskilstuna Innerstad ...]]></description>
			<content:encoded><![CDATA[<p>Vi har tagit fram en ny webbplats åt Eskilstuna Innerstad som ska verka för en bättre innerstad. Vi har gjort både design och det tekniska. Sajten bygger på Open Source CMS:et <a href="http://www.umbraco.org" target="_blank">Umbraco</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#eskilstuna-innerstad-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto generated branches</title>
		<link>http://www.x-com.se/labs/flash/auto-generated-branches.html</link>
		<comments>http://www.x-com.se/labs/flash/auto-generated-branches.html#comments</comments>
		<pubDate>Wed, 28 Apr 2010 09:53:20 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1033</guid>
		<description><![CDATA[I want to create a nice 3D-effect with branches growing, ...]]></description>
			<content:encoded><![CDATA[<p>I want to create a nice 3D-effect with branches growing, flowing and rotating around each other. Just to make sure that my idea is working I decided just to create a proof of concept in 2D. With a few tweaks with the parameters it turned out to be some pretty nice organic trees/bushes.</p>
<p><a rel="shadowbox;width=900;height=400" href="/wp-content/uploads/2010/04/trees.swf"><img title="Trees" src="/wp-content/uploads/2010/04/treeGenerator.jpg" alt="Trees" width="600" height="340" /></a></p>
<p> I&#8217;ll go through the code and explain what it does.<br />
<span id="more-1033"></span></p>
<p>I divided the example into 3 classes. Main.as (just puts the trees on the stage), Tree.as (keeps track of all the branches, updates and destroys them and draws them to the canvas) and Branch.as (holds the information of one single branch).</p>
<p>I believe its easiest if we just start with the smallest component, the branch.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">TweenLite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> se.<span class="me1">xcom</span>.<span class="kw3">math</span>.<span class="me1">Degrees</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Branch<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> rotZ:<span class="kw3">Number</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> rotZSpeed:<span class="kw3">Number</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> x:<span class="kw3">Number</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> y:<span class="kw3">Number</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> thickness:<span class="kw3">Number</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> speed:<span class="kw3">Number</span> = <span class="nu0">3</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> rotationSpeedSpan:<span class="kw3">Number</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> rotationSpeedFragility:<span class="kw3">Number</span> = <span class="nu0">0.2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Branch<span class="br0">&#40;</span>x:<span class="kw3">Number</span>,y:<span class="kw3">Number</span>,rotZ:<span class="kw3">Number</span>,thickness:<span class="kw3">Number</span>,rotationSpeedSpan:<span class="kw3">Number</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">x</span> = x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">y</span> = y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">rotZ</span> = rotZ;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">thickness</span> = thickness;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">rotationSpeedSpan</span> = rotationSpeedSpan;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setRotationSpeed<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> update<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x += Degrees.<span class="me1">dSin</span><span class="br0">&#40;</span>rotZ<span class="br0">&#41;</span><span class="sy0">*</span>speed;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y += Degrees.<span class="me1">dCos</span><span class="br0">&#40;</span>rotZ<span class="br0">&#41;</span><span class="sy0">*</span>speed;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rotZ += rotZSpeed;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thickness-= <span class="nu0">0.04</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> destroy<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// kill the endless loop</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenLite.<span class="me1">killTweensOf</span><span class="br0">&#40;</span><span class="kw3">this</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> setRotationSpeed<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// To make sure that the rotation of the branch moves smoothly I decide not to tween the actual rotation but the speed of the rotation.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// This is an endless loop, calling itself when the tween has ended.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> newSpeed:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>rotationSpeedSpan-rotationSpeedSpan<span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> delay:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>rotationSpeedFragility+rotationSpeedFragility<span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenLite.<span class="me1">to</span><span class="br0">&#40;</span><span class="kw3">this</span>,delay,<span class="br0">&#123;</span>rotZSpeed:newSpeed,onComplete:setRotationSpeed<span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>As you can see, the branch is not a display object. It just carries the info about the branch so <strong>Tree.as</strong> can draw it on it&#8217;s graphics canvas. The <strong>update()</strong> function makes sure that the branch shrinks in thickness, rotates and grows in the current direction it is given. The rotation is is changed through the Tween in <strong>setRotationSpeed()</strong>. Really nothing special (oh and if you are wondering about the Degrees class, it&#8217;s just converting radians into degrees as I hate radians.) Let&#8217;s move on to the Tree.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">greensock</span>.<span class="me1">TweenLite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Tree <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> <span class="kw3">color</span>:<span class="kw3">Number</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aBranches:<span class="kw3">Array</span> = <span class="br0">&#91;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Tree<span class="br0">&#40;</span><span class="kw3">color</span>:<span class="kw3">Number</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="kw3">color</span> = <span class="kw3">color</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reset<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> <span class="kw3">start</span><span class="br0">&#40;</span>delay:<span class="kw3">int</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Just starts drawing the tree. Implanted only so the trees doesnt start drawing at the same time.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenLite.<span class="me1">delayedCall</span><span class="br0">&#40;</span>delay,<span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>addEventListener<span class="br0">&#40;</span>Event.<span class="me1">ENTER_FRAME</span>,onTick<span class="br0">&#41;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> onTick<span class="br0">&#40;</span><span class="kw3">e</span>:Event<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Goes through every branch in the tree.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="kw1">each</span><span class="br0">&#40;</span><span class="kw2">var</span> br:Branch <span class="kw1">in</span> aBranches<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Updates the branch and draws a new line between the old position and the new one.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">with</span> <span class="br0">&#40;</span><span class="kw3">this</span>.<span class="me1">graphics</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">lineStyle</span><span class="br0">&#40;</span>br.<span class="me1">thickness</span>,<span class="kw3">color</span>,1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">moveTo</span><span class="br0">&#40;</span>br.<span class="me1">x</span>,br.<span class="me1">y</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; br.<span class="me1">update</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">lineTo</span><span class="br0">&#40;</span>br.<span class="me1">x</span>,br.<span class="me1">y</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Randomly decides wether to create a new branch origin from the current branch.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">&lt;</span> 0.1-<span class="br0">&#40;</span>br.<span class="me1">thickness</span><span class="sy0">*</span>0.01<span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> th:<span class="kw3">int</span> = <span class="br0">&#40;</span>br.<span class="me1">thickness</span><span class="sy0">&gt;</span>0.7<span class="br0">&#41;</span>?<span class="br0">&#40;</span>br.<span class="me1">thickness</span>-1<span class="br0">&#41;</span>:br.<span class="me1">thickness</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tbr:Branch = <span class="kw2">new</span> Branch<span class="br0">&#40;</span>br.<span class="me1">x</span>,br.<span class="me1">y</span>,br.<span class="me1">rotZ</span>,th,br.<span class="me1">rotationSpeedSpan</span>+14<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBranches.<span class="kw3">push</span><span class="br0">&#40;</span>tbr<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Goes through every branch in the tree (again!) just to destroy the branches that are too small.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span>= aBranches.<span class="me1">length</span>-<span class="nu0">1</span>;i <span class="sy0">&gt;</span> -<span class="nu0">1</span>;i&#8211;<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tbr:Branch = aBranches<span class="br0">&#91;</span>i<span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>tbr.<span class="me1">thickness</span> <span class="sy0">&lt;</span> 0.4<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tbr.<span class="me1">destroy</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBranches.<span class="kw3">splice</span><span class="br0">&#40;</span>i,<span class="nu0">1</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Checks if there are no &quot;alive&quot; branches left.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>aBranches.<span class="kw3">length</span> == 0<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenLite.<span class="me1">to</span><span class="br0">&#40;</span><span class="kw3">this</span>,2,<span class="br0">&#123;</span>alpha:0,onComplete:reset<span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> reset<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">graphics</span>.<span class="kw3">clear</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alpha = <span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tbr:Branch = <span class="kw2">new</span> Branch<span class="br0">&#40;</span>0,0,180,8,5<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBranches.<span class="kw3">push</span><span class="br0">&#40;</span>tbr<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>As you can see, <strong>start()</strong> sets an Event.ENTER_FRAME listener so it automatically runs <strong>onTick()</strong> every frame. Most of the comments in the code tells you whats happening inside. It takes all the branches it currently has, updates them, draws them, sometimes spawns new branches and finally removes them if their thickness is, well not thick enough.</p>
<p>Only the Main.as class remains. I guess it need&#8217;s no comments. </p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Main <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aTrees:<span class="kw3">Array</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aColors:<span class="kw3">Array</span>=<span class="br0">&#91;</span>0xffbb88,0xaaffaa,0xaabbff<span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aBranches:<span class="kw3">Array</span> &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Main<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span> = <span class="nu0">0</span>;i<span class="sy0">&lt;</span><span class="nu0">3</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tree:Tree = <span class="kw2">new</span> Tree<span class="br0">&#40;</span>aColors<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree.<span class="me1">x</span> = 250<span class="sy0">*</span>i+<span class="nu0">200</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree.<span class="me1">y</span> = <span class="nu0">370</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree.<span class="kw3">start</span><span class="br0">&#40;</span>i<span class="sy0">*</span>3.5<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>tree<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>There you go, three tiny trees growing on your screen. There are lots of parameters that could be lifted out and tweaked with giving you more branches, faster drawing, stranger rotation of the branches and so on. But I leave it up to you to lift them out and customize the classes. </p>
<p>/Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/auto-generated-branches.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ViewportLayers &#8211; In depth (Papervision3D)</title>
		<link>http://www.x-com.se/labs/flash/viewportlayers-in-depth-papervision3d.html</link>
		<comments>http://www.x-com.se/labs/flash/viewportlayers-in-depth-papervision3d.html#comments</comments>
		<pubDate>Wed, 21 Apr 2010 12:12:53 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=1005</guid>
		<description><![CDATA[The more I see where people get stuck, using PV3D, ...]]></description>
			<content:encoded><![CDATA[<p>The more I see where people get stuck, using PV3D, the more I feel the need to create a good tutorial regarding ViewportLayers.<br />
Lets start with the simple task of NOT using any layers. First the document class that just adds our BasicView.<br />
<span id="more-1005"></span></p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> ViewportLayerTest <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> ViewportLayerTest<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tView:View3d = <span class="kw2">new</span> View3d<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>tView<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Now let’s build up a scene with a ground, a wall stuck to the ground and a sphere that is stuck right in the middle of the wall.<br />
That would look something like this.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">materials</span>.<span class="me1">WireframeMaterial</span>;<br />
&nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Cube</span>;<br />
&nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Plane</span>;<br />
&nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Sphere</span>;<br />
&nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">view</span>.<span class="me1">BasicView</span>;</p>
<p>&nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> View3d <span class="kw3">extends</span> BasicView<br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> sphere:Sphere;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> cube:Cube;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> ground:Plane;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> wall:Plane;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> View3d<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setupScene<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startRendering<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> setupScene<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">x</span> = <span class="nu0">660</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">y</span> = &nbsp;<span class="nu0">400</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">z</span> = -<span class="nu0">700</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ground = <span class="kw2">new</span> Plane<span class="br0">&#40;</span><span class="kw2">new</span> WireframeMaterial<span class="br0">&#40;</span>0&#215;224422<span class="br0">&#41;</span>,1000,1000,1,1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ground.<span class="me1">rotationX</span> = <span class="nu0">90</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wall = <span class="kw2">new</span> Plane<span class="br0">&#40;</span><span class="kw2">new</span> WireframeMaterial<span class="br0">&#40;</span>0&#215;556655<span class="br0">&#41;</span>,1000,400,1,1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wall.<span class="me1">y</span> = <span class="nu0">200</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere = <span class="kw2">new</span> Sphere<span class="br0">&#40;</span><span class="kw2">new</span> WireframeMaterial<span class="br0">&#40;</span>0xff2222<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere.<span class="me1">x</span> = -<span class="nu0">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere.<span class="me1">y</span> = <span class="nu0">100</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>ground<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>wall<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>sphere<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Run that swf and you will see this:<br />
<img class="alignnone size-full wp-image-1011" title="bild-11" src="http://www.x-com.se/wp-content/uploads/2010/04/bild-11.png" alt="bild-11" width="508" height="390" /></p>
<p>Let us now put a little more code in and also change the material into solid colour ones (I put a FlastShader on the sphere so we can see the roundness more easily).</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">lights</span>.<span class="me1">PointLight3D</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">materials</span>.<span class="me1">ColorMaterial</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">materials</span>.<span class="me1">shadematerials</span>.<span class="me1">FlatShadeMaterial</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Cube</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Plane</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">objects</span>.<span class="me1">primitives</span>.<span class="me1">Sphere</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> org.<span class="me1">papervision3d</span>.<span class="me1">view</span>.<span class="me1">BasicView</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> View3d <span class="kw3">extends</span> BasicView<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> light:PointLight3D;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> sphere:Sphere;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> cube:Cube;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> ground:Plane;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> wall:Plane;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> View3d<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setupScene<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startRendering<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> setupScene<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">x</span> = <span class="nu0">660</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">y</span> = &nbsp;<span class="nu0">400</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">camera</span>.<span class="me1">z</span> = -<span class="nu0">700</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; light = <span class="kw2">new</span> PointLight3D<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; light.<span class="me1">x</span> = -<span class="nu0">400</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; light.<span class="me1">z</span> = -<span class="nu0">1000</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; light.<span class="me1">y</span> = <span class="nu0">200</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ground = <span class="kw2">new</span> Plane<span class="br0">&#40;</span><span class="kw2">new</span> ColorMaterial<span class="br0">&#40;</span>0&#215;224422<span class="br0">&#41;</span>,1000,1000,1,1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ground.<span class="me1">rotationX</span> = <span class="nu0">90</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wall = <span class="kw2">new</span> Plane<span class="br0">&#40;</span><span class="kw2">new</span> ColorMaterial<span class="br0">&#40;</span>0&#215;446644<span class="br0">&#41;</span>,800,400,1,1<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wall.<span class="me1">y</span> = <span class="nu0">200</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere = <span class="kw2">new</span> Sphere<span class="br0">&#40;</span><span class="kw2">new</span> FlatShadeMaterial<span class="br0">&#40;</span>light,0xff2222<span class="br0">&#41;</span>,100,10,10<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere.<span class="me1">x</span> = -<span class="nu0">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sphere.<span class="me1">y</span> = <span class="nu0">100</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>ground<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>wall<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scene.<span class="me1">addChild</span><span class="br0">&#40;</span>sphere<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Run it and witness this:</p>
<p><img class="alignnone size-full wp-image-1008" title="bild-2" src="http://www.x-com.se/wp-content/uploads/2010/04/bild-2.png" alt="bild-2" width="510" height="391" /></p>
<p>Now that aint right! This is just the Z-fighting I talked about in an earlier post. Looking at the wireframe one can see that the “centerpoint” of the left triangle in the ground is actually closer to the than many of the sphere and walls centrepoint so that is why we get that strange phenomena. It just is drawn later than it should.</p>
<p>Now lets use layers just like in Flash 2D. (well sort of).</p>
<h2>What are ViewportLayers?</h2>
<p>As I assume that you are familiar to the Flash environment and AS3, I will descripe the ViewportLayers just like layered movieclips on top of each other in a normal DisplayList. The Viewport is rendering all these layers one by one in the order it is told to which gives you the power to control when something is going to be rendered.</p>
<p>Now, the PV3D team has been very ambitious when it comes to layers and therefo you will find many different ways of creating one or even handling one.</p>
<p>First of all, let me say that we already got 2 layers. One is the actual Viewport.containerSprite that is the “root” of every layer.</p>
<p>If we write</p>
<p><strong><em>trace(viewport.containerSprite.childLayers.toString());</em></strong></p>
<p>you will see a layer underneath as well. This is what we got this far.</p>
<p>One approach to working with layers is to just set up a structure of empty layers at first and then fill in the objects that needs to be in which layer.</p>
<p>Let’s try this on our testscene. Put this script after you add the objects to the scene:</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co1">// create 3 new layers, null says that it will be empty initially.</span><br />
<span class="kw2">var</span> sphereLayer:ViewportLayer = <span class="kw2">new</span> ViewportLayer<span class="br0">&#40;</span>viewport,<span class="kw2">null</span><span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> wallLayer:ViewportLayer = <span class="kw2">new</span> ViewportLayer<span class="br0">&#40;</span>viewport,<span class="kw2">null</span><span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> groundLayer:ViewportLayer = <span class="kw2">new</span> ViewportLayer<span class="br0">&#40;</span>viewport,<span class="kw2">null</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// add the layers as childs to the &quot;root&quot;-layer</span><br />
viewport.<span class="me1">containerSprite</span>.<span class="me1">addLayer</span><span class="br0">&#40;</span>sphereLayer<span class="br0">&#41;</span>;<br />
viewport.<span class="me1">containerSprite</span>.<span class="me1">addLayer</span><span class="br0">&#40;</span>wallLayer<span class="br0">&#41;</span>;<br />
viewport.<span class="me1">containerSprite</span>.<span class="me1">addLayer</span><span class="br0">&#40;</span>groundLayer<span class="br0">&#41;</span>;</p>
<p><span class="co1">// set the sorting of all childlayers to sort by index</span><br />
viewport.<span class="me1">containerSprite</span>.<span class="me1">sortMode</span> = ViewportLayerSortMode.<span class="me1">INDEX_SORT</span>;</p>
<p><span class="co1">// set the sort index of the new layer</span><br />
groundLayer.<span class="me1">layerIndex</span> = <span class="nu0">1</span>;<br />
wallLayer.<span class="me1">layerIndex</span> = <span class="nu0">2</span>;<br />
sphereLayer.<span class="me1">layerIndex</span> = <span class="nu0">3</span>;</p>
<p><span class="co1">// add our objects to the new layers</span><br />
groundLayer.<span class="me1">addDisplayObject3D</span><span class="br0">&#40;</span>ground<span class="br0">&#41;</span>;<br />
wallLayer.<span class="me1">addDisplayObject3D</span><span class="br0">&#40;</span>wall<span class="br0">&#41;</span>;<br />
sphereLayer.<span class="me1">addDisplayObject3D</span><span class="br0">&#40;</span>sphere<span class="br0">&#41;</span>;</div>
</div>
</div>
</div>
<p>And here’s the result:</p>
<p><img class="alignnone size-full wp-image-1009" title="bild-3" src="http://www.x-com.se/wp-content/uploads/2010/04/bild-3.png" alt="bild-3" width="508" height="390" /></p>
<p>Now the layers are like 3 “sprites” drawn separately on the viewport. First the ground (as it has the lowest index), then the wall, overwriting all of the ground. Finally the sphere. Notice that even though the sphere was half stuck into the wall, we can see the whole sphere now.<br />
As you can put “childLayers” in other layers you can also experiment with nesting layers into each other and sorting them differently depending on your needs.<br />
As I mentioned there are several approaches to creating layers.<br />
If you just erase what we just added we will try another approach.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co1">// this time, let&#8217;s use the viewport to create layers, through objects.</span><br />
<span class="co1">// true means that if &#8217;sphere&#8217; does not belong to a layer, create one for it and put it there.</span><br />
<span class="kw2">var</span> sphereLayer:ViewportLayer = viewport.<span class="me1">getChildLayer</span><span class="br0">&#40;</span>sphere, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> groundLayer:ViewportLayer = viewport.<span class="me1">getChildLayer</span><span class="br0">&#40;</span>sphere, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> wallLayer:ViewportLayer = viewport.<span class="me1">getChildLayer</span><span class="br0">&#40;</span>sphere, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
viewport.<span class="me1">containerSprite</span>.<span class="me1">sortMode</span> = ViewportLayerSortMode.<span class="me1">INDEX_SORT</span>;</p>
<p><span class="co1">// set the sort index of the new layer</span><br />
groundLayer.<span class="me1">layerIndex</span> = <span class="nu0">2</span>;<br />
wallLayer.<span class="me1">layerIndex</span> = <span class="nu0">1</span>;<br />
sphereLayer.<span class="me1">layerIndex</span> = <span class="nu0">3</span>;</div>
</div>
</div>
</div>
<p>As I changed the indexorder, the result now looks like this:<br />
<img class="alignnone size-full wp-image-1010" title="bild-4" src="http://www.x-com.se/wp-content/uploads/2010/04/bild-4.png" alt="bild-4" width="510" height="392" /></p>
<p>Notice that<strong><em> viewport.getChildLayer()</em></strong> does create a new layer, put the object in it and also puts the layer in the structurelist of the containerSprite. Easy and simple, but maybe with a little less control of the layers placement in the “layertree”.<br />
A last way of creating layers I want to bring up today is the DO3D.useOwnContainer<br />
It automatically creates a layer for just that object which gives you great control over effects like:<br />
<strong>DO3D.filters<br />
DO3D.blendMode<br />
DO3D.alpha</strong><br />
Try to set this simple variable to true and experiment with these 3 parameters. I know that people are asking a lot about alpha and effects and this is such an easy way to get that.</p>
<p>As long as you think of the layers as single Sprites/MovieClips on top of each other you will be able to come up with great effects. Are you having a problem getting a great buttonMode on all your objects? Put them in a layer and call:<strong><em> layer.buttonMode = true</em></strong></p>
<p>You want some of your cubes to glow? Why don’t you try <em><strong>layer.Filters</strong></em>?</p>
<p>You even have unique control over how OFTEN that special layer will be rendered. In my game I will consider a static overview camera for lowperformance computers. This means that I will only render the ground and the whole Arena ONCE and then only render the units, bullets and explosions. Really a processorsaver! How to do it?</p>
<p>Well, put all layers that will be rendered into an array, eg aLayers:Array</p>
<p>Now send that array into: renderer.renderLayers(scene, camera, viewport, aLayers)</p>
<p>This will tell the renderer to only render those layers.</p>
<p>ViewportLayers holds a lot of secrets and great functionality but I stop here and will probably come out with a more advanced tutorial later on. Now you got the basics to take control over your renderings!</p>
<p>/Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/viewportlayers-in-depth-papervision3d.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Particle system #1 &#8211; Basic particles</title>
		<link>http://www.x-com.se/labs/flash/particle-system-1-basic-particles.html</link>
		<comments>http://www.x-com.se/labs/flash/particle-system-1-basic-particles.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 13:58:05 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=989</guid>
		<description><![CDATA[As I am coming from a background of gameprogramming (and ...]]></description>
			<content:encoded><![CDATA[<p>As I am coming from a background of gameprogramming (and originally from the demo scene in the 90´s) am I very fond of small tips and tricks to create nice special effects. There are few project that I see out there that couldn&#8217;t be spiced up with a nice particle system so I decided to go through some basics of particle systems and how they can be used to create a variety of effects. In this first &#8220;chapter&#8221; I will just go through the basics of a system and how it works and then later on create a more flexible system that can be used in oh so many situations.</p>
<p>Now lets look at what we will create today:</p>
<p><a rel="shadowbox;width=450;height=450" href="/wp-content/uploads/2010/04/supernova.swf"><img title="facewarp" src="/wp-content/uploads/2010/04/supernova.jpg" alt="Facewarp" width="600" height="340" /></a></p>
<p>Neat right? Let&#8217;s dive into the universe of particles&#8230;<br />
<span id="more-989"></span></p>
<p>For a programmer used to flash (which is a very &#8220;visual&#8221; language) it&#8217;s not especially hard to understand the concept of particles as it is nothing less than Displayobjects being placed on screen and adjusted using it&#8217;s normal parameters such as scale, rotation, color and position. In this exampel you see two different particle systems. One with the stars, adjusting their scale, alpha and position to create the illusion of the camera travelling forward in an endless space. The other system is the supernova with a few &#8220;particles&#8221; being placed in the center, scaled, rotated and then fading out with the alpha. Everything is blended with the awesome ADD-blendmode which must be the most used blendmode in any game/demo with some self respect. Both these systems origins from the center of the scene/stage so the Main class of this small app is probably very basic.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> se.<span class="me1">xcom</span>.<span class="me1">effects</span>.<span class="me1">particle</span>.<span class="me1">NovaEmitter</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> se.<span class="me1">xcom</span>.<span class="me1">effects</span>.<span class="me1">particle</span>.<span class="me1">StarEmitter</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> LiteTest <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> LiteTest<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// create the emitters and adding it to the middle of scene.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> nova:NovaEmitter = <span class="kw2">new</span> NovaEmitter<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nova.<span class="me1">x</span> = <span class="kw3">stage</span>.<span class="me1">stageWidth</span><span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nova.<span class="me1">y</span> = <span class="kw3">stage</span>.<span class="me1">stageHeight</span><span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nova.<span class="me1">scaleX</span> = <span class="nu0">2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nova.<span class="me1">scaleY</span> = <span class="nu0">2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> stars:StarEmitter = <span class="kw2">new</span> StarEmitter<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stars.<span class="me1">x</span> = <span class="kw3">stage</span>.<span class="me1">stageWidth</span><span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stars.<span class="me1">y</span> = <span class="kw3">stage</span>.<span class="me1">stageHeight</span><span class="sy0">*</span>.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>nova<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>stars<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>Ok, lets take a look at one of the systems. All particle systems have some kind of &#8220;emitter&#8221;. You can see it as an object on the scene that is producing particles. It is  not visible itself but the particles it &#8220;emits&#8221; is (most of the time) visible. The emitter is somehow the engine that decides how many particles is being generated, how they behave, rotate, scale etc..  You can see it as a located factory in the screen producing particles. Sometimes it shoots the particles out from the center of itself (just like nova in this example) but it could on the other hand let particles be spawned all around itself just like the stars system.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package se.<span class="me1">xcom</span>.<span class="me1">effects</span>.<span class="me1">particle</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BlendMode</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">TimerEvent</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">utils</span>.<span class="me1">Timer</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> gs.<span class="me1">TweenMax</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> gs.<span class="me1">easing</span>.<span class="me1">Linear</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> NovaEmitter <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> emitTimer:Timer<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Time until next particle is emitted (ms).</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw3">static</span> const EMIT_TIME:<span class="kw3">Number</span> = 1500<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> NovaEmitter<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer = <span class="kw2">new</span> Timer<span class="br0">&#40;</span>EMIT_TIME<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer.<span class="me1">addEventListener</span><span class="br0">&#40;</span>TimerEvent.<span class="me1">TIMER</span>,onTimer<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer.<span class="kw3">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// creating a few particles to begin with.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:uint=<span class="nu0">0</span>;i <span class="sy0">&lt;</span> <span class="nu0">5</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createParticle<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> onTimer<span class="br0">&#40;</span><span class="kw3">e</span>:TimerEvent<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createParticle<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> createParticle<span class="br0">&#40;</span>prog:<span class="kw3">Number</span> = 0<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> part:Sprite = <span class="kw2">new</span> Particle<span class="br0">&#40;</span><span class="br0">&#41;</span> &nbsp;<span class="co1">// is a simple bitmap in flash library converted as a Sprite.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// modifying particle.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">rotation</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>360<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">scaleX</span> = part.<span class="me1">scaleY</span> = 0.3+<span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>0.3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">blendMode</span> = BlendMode.<span class="kw3">ADD</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">alpha</span> = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw3">time</span>:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>7+5<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> rot:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>180-90<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> scale:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>1.6+0.6<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> posX:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>50-25<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> posY:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>50-25<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>part<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,<span class="kw3">time</span>,<span class="br0">&#123;</span>x:posX,y:posY,rotation:<span class="kw3">String</span><span class="br0">&#40;</span>rot<span class="br0">&#41;</span>,scaleX:scale,scaleY:scale,ease:Linear.<span class="me1">easeOut</span>, onComplete:killParticle,onCompleteParams:<span class="br0">&#91;</span>part<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,<span class="kw3">time</span><span class="sy0">/</span>4,<span class="br0">&#123;</span>alpha:1,overwrite:<span class="kw2">false</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,<span class="kw3">time</span><span class="sy0">*</span>2<span class="sy0">/</span>3,<span class="br0">&#123;</span>delay:<span class="kw3">time</span><span class="sy0">/</span>3,alpha:0,overwrite:<span class="kw2">false</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> killParticle<span class="br0">&#40;</span>obj:Sprite<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">removeChild</span><span class="br0">&#40;</span>obj<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj = <span class="kw2">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>As you can see the Nova-system creates a new particle every 1.5 sec. It sets a lot of random parameters for the sprite and then just tweens it using the badass library TweenMax (which can be found <a title="TweenMax" href="http://www.greensock.com/tweenmax/">here.</a> and then destroy&#8217;s itself neatly afterwards. Straightforward huh? The secret with the fluid animation of the nova is mostly because of the blendmode that I previously mentioned.<br />
ADD does exactly what it says. It adds two colours (their rgb-values) into one. this is great for oh so many purposes. First of all it never gives you any black corners as if it&#8217;s black, it just shows the colour behind. Also it is a great way to mask out an effect with a black background without using alphachannels. In fact this is a much faster way for the processor to handle masking than alphachannels are. </p>
<p>Now let&#8217;s look at the stars. They are not different at all.</p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package se.<span class="me1">xcom</span>.<span class="me1">effects</span>.<span class="me1">particle</span><br />
<span class="br0">&#123;</span><br />
<span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">BlendMode</span>;<br />
<span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
<span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">TimerEvent</span>;<br />
<span class="kw3">import</span> flash.<span class="me1">utils</span>.<span class="me1">Timer</span>;</p>
<p><span class="kw3">import</span> gs.<span class="me1">TweenMax</span>;<br />
<span class="kw3">import</span> gs.<span class="me1">easing</span>.<span class="me1">Quad</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> StarEmitter <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> emitTimer:Timer<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw3">static</span> const STAR_TIME:<span class="kw3">Number</span> = 4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw3">static</span> const EMIT_TIME:<span class="kw3">Number</span> = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> StarEmitter<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer = <span class="kw2">new</span> Timer<span class="br0">&#40;</span>EMIT_TIME<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer.<span class="me1">addEventListener</span><span class="br0">&#40;</span>TimerEvent.<span class="me1">TIMER</span>,onTimer<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emitTimer.<span class="kw3">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// initiating with some stars</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:uint=<span class="nu0">0</span>;i <span class="sy0">&lt;</span> <span class="nu0">40</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createParticle<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> onTimer<span class="br0">&#40;</span><span class="kw3">e</span>:TimerEvent<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:uint=<span class="nu0">0</span>;i <span class="sy0">&lt;</span> <span class="nu0">3</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createParticle<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> createParticle<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> part:Sprite = <span class="kw2">new</span> Star<span class="br0">&#40;</span><span class="br0">&#41;</span> &nbsp;<span class="co1">// is a simple bitmap in flash library converted as a Sprite.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// modifying particle.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> z:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; &nbsp;<span class="co1">// z = 1 means it is in the same Z as the camera</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> posX:<span class="kw3">Number</span> = <span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>1500-750<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> posY:<span class="kw3">Number</span> = <span class="br0">&#40;</span><span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">*</span>1500-750<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">blendMode</span> = BlendMode.<span class="kw3">ADD</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">alpha</span> = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">scaleX</span> = part.<span class="me1">scaleY</span> =0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">x</span> = posX<span class="sy0">*</span>z<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; part.<span class="me1">y</span> = posY<span class="sy0">*</span>z<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>part<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> t:<span class="kw3">Number</span> = STAR_TIME<span class="sy0">*</span><span class="br0">&#40;</span>1-z<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> endScale:<span class="kw3">Number</span> = <span class="kw3">Math</span>.<span class="kw3">random</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,t,<span class="br0">&#123;</span>x:posX,y:posY,scaleX:endScale,scaleY:endScale,ease:Quad.<span class="me1">easeIn</span>, onComplete:killParticle,onCompleteParams:<span class="br0">&#91;</span>part<span class="br0">&#93;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,t<span class="sy0">/</span>2,<span class="br0">&#123;</span>alpha:1,overwrite:<span class="kw2">false</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TweenMax.<span class="me1">to</span><span class="br0">&#40;</span>part,t<span class="sy0">*</span>1<span class="sy0">/</span>2,<span class="br0">&#123;</span>delay:t<span class="sy0">*</span>1<span class="sy0">/</span>2,alpha:0,overwrite:<span class="kw2">false</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> killParticle<span class="br0">&#40;</span>obj:Sprite<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">removeChild</span><span class="br0">&#40;</span>obj<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj = <span class="kw2">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>The only difference in this class is the way the particles are positioned and adjusted in the tweens. To give you the illusion of depth/moving forward, I create a fake Z-axis value with the span of 0-1. 1 would be closest to the viewer and positioning the star at posX on the screen with the full scale of 1. Any other lower z-value brings the star towards the middle of the screen and also lowers the scale giving the illusion of the star moving further away from the viewer. Some fancy adjusting with alpha tweening in and out + a nice easeIn so the stars that is further away moves more slowly adds to the illusion even more.</p>
<p>Now, there is a great basic example how to use a few particles. Now is it a real system yet?? Well, there are a lot you could do to make it more dynamic. First of all we shouldn&#8217;t have to create 2 classes for these very similar classes. In the next part I ill give you the basics to create a more dynamic particle system where you can tweak a lot of parameters to be able to create snow, rain, fire, smoke, explosions etc&#8230; exciting, huh?<br />
Have fun!</p>
<p>/Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/particle-system-1-basic-particles.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>FaceWarp &#8211; mess up your face.</title>
		<link>http://www.x-com.se/labs/flash/facewarp-mess-up-your-face.html</link>
		<comments>http://www.x-com.se/labs/flash/facewarp-mess-up-your-face.html#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:59:09 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=979</guid>
		<description><![CDATA[So we&#8217;ve probably all seen it somehow. Upload an image ...]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;ve probably all seen it somehow. Upload an image of yourself, transform it and then spread it around to your friends.</p>
<p>Here I tried one technique I came up with, using a polygonmesh (using Papervision3D but still keeping it plain without any Z-depth). Using this wired image I can easily string up every vertex in the mesh and move them around, controlling every and each muscle in the face if I want to. For this demo I have two controllers for the eyebrows and lips.<br />
To add some nice extra effect the sliders also control two bitmaplayers alpha. The bitmaps are just wrinkles and dark rings around the eye which is transformed via the UWV so it fits to every image you upload, just move the crosshairs to the center of the eyes and the corners of the mouth.</p>
<p>Enjoy.</p>
<p><a rel="shadowbox;width=380;height=400" href="/wp-content/uploads/2010/04/FaceWarp.swf"><img title="facewarp" src="/wp-content/uploads/2010/04/faceWarp.jpg" alt="Facewarp" width="600" height="340" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/facewarp-mess-up-your-face.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vissa fick Guldägg, vi fick diplom</title>
		<link>http://www.x-com.se/aktuellt/vissa-fick-guldagg-vi-fick-diplom.html</link>
		<comments>http://www.x-com.se/aktuellt/vissa-fick-guldagg-vi-fick-diplom.html#comments</comments>
		<pubDate>Fri, 16 Apr 2010 07:43:29 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=972</guid>
		<description><![CDATA[Igår kväll delades årets Guldägg ut. Vårt hopp stod till ...]]></description>
			<content:encoded><![CDATA[<p><img style="border: 0;" src="/wp-content/uploads/2010/04/guldagg_300x200.jpg" alt="Guldägget" title="Guldägget" width="300" height="200" class="alignright size-full wp-image-636" />Igår kväll delades årets <a href="http://www.guldagget.se/">Guldägg</a> ut. Vårt hopp stod till kampanjen <a target="_self" href="http://www.x-com.se/produktioner#tele2-mobilt-internet-live">Mobilt Internet Live för Tele2</a> som vi producerade tillsammans med Forsman &#038; Bodenfors. Tyvärr blev det inget Guldägg för oss, men väl två diplom i kategorierna <a href="http://www.resume.se/nyheter/2010/04/15/riksgalden-bast-pa-integre/">integrerat</a> och <a href="http://www.resume.se//nyheter/2010/04/15/webbskrall-i-guldagget/">interaktivt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vissa-fick-guldagg-vi-fick-diplom.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gevalia &#8211; Whole Bean Messenger</title>
		<link>http://www.x-com.se/produktioner/kampanjer#gevalia-whole-bean-messenger</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#gevalia-whole-bean-messenger#comments</comments>
		<pubDate>Wed, 07 Apr 2010 11:31:05 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=950</guid>
		<description><![CDATA[Tillsammans med B-Reel som stått för designen, har vi skapat ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med B-Reel som stått för designen, har vi skapat kampanjsajten för Gevalia &#8211; Whole Bean Messenger.</p>
<p>Följ kaffegurun Giovanni Masurzo i hans kaffeskola när han berättar hur du med enkla medel brygger det perfekta kaffet, eller skicka en rolig hälsning till dina vänner där du själv spelar huvudrollen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#gevalia-whole-bean-messenger/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disney &#8211; När klockan ringer</title>
		<link>http://www.x-com.se/produktioner/webbplatser#disney-nar-klockan-ringer</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#disney-nar-klockan-ringer#comments</comments>
		<pubDate>Wed, 24 Feb 2010 23:00:56 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=929</guid>
		<description><![CDATA[Vi har fått äran att tillsammans med Pool skapa en ...]]></description>
			<content:encoded><![CDATA[<p>Vi har fått äran att tillsammans med Pool skapa en interaktiv hemsida till Disney Channel Scandinavias första lokalproducerade program &#8220;När klockan ringer&#8221;.</p>
<p>Denna barnserie handlar om vad som händer under de 5 minuterna i korridoren mellan lektionerna. Varje avsnitt inleds och avslutas med att skolklockan ringer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#disney-nar-klockan-ringer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ving &#8211; Turkiet</title>
		<link>http://www.x-com.se/produktioner/kampanjer#ving-turkiet</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#ving-turkiet#comments</comments>
		<pubDate>Wed, 17 Feb 2010 10:12:24 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=936</guid>
		<description><![CDATA[Tillsammans med Forsman &#038; Bodenfors har vi skapat en kampanj ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Forsman &#038; Bodenfors har vi skapat en kampanj för Ving. I detta fall är det resmålet Turkiet, och kanske framförallt deras matkultur, som uppmärksammas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#ving-turkiet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT &#8211; OS, live i mobilen</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-os-live-i-mobilen</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-os-live-i-mobilen#comments</comments>
		<pubDate>Mon, 15 Feb 2010 13:57:18 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=927</guid>
		<description><![CDATA[Olympiska vinterspelen 2010 avgörs i Vancouver. Startskottet gick den 12:e ...]]></description>
			<content:encoded><![CDATA[<p>Olympiska vinterspelen 2010 avgörs i Vancouver. Startskottet gick den 12:e februari, likaså deadline för våra banners som vi producerat för Forsman &#038; Bodenfors.</p>
<p>Syftet med dessa banners är att uppmärksamma att OS går att följa direkt i mobilen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-os-live-i-mobilen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vinnare av Årets företagare 2010!</title>
		<link>http://www.x-com.se/aktuellt/vinnare-av-arets-foretagare-2010.html</link>
		<comments>http://www.x-com.se/aktuellt/vinnare-av-arets-foretagare-2010.html#comments</comments>
		<pubDate>Mon, 15 Feb 2010 10:45:14 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=906</guid>
		<description><![CDATA[Vi var nominerade till Årets företagare 2010 under tillställningen Marknadsplats ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.x-com.se/wp-content/uploads/2010/02/x-com_vinnare_marknadsplats.jpg" alt="Marknadsplats 2010" title="Marknadsplats 2010" width="300" height="200" class="alignright size-full wp-image-907" />Vi var nominerade till Årets företagare 2010 under tillställningen Marknadsplats som hölls i Stadshuset. Vi på X-Com gick segrande och firade hela natten lång! Vi tackar för en lyckad tillställning.</p>
<p>Läs mer på <a href="http://ekuriren.se/jobbpengar/1.629606">Eskilstuna Kuriren</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vinnare-av-arets-foretagare-2010.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mer &#8211; Valentines day</title>
		<link>http://www.x-com.se/produktioner/kampanjer#mer-valentines-day</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#mer-valentines-day#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:29:26 +0000</pubDate>
		<dc:creator>Jani</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://www.x-com.se/?p=886</guid>
		<description><![CDATA[Denna kampanj för MER, i samband med alla hjärtans dag ...]]></description>
			<content:encoded><![CDATA[<p>Denna kampanj för MER, i samband med alla hjärtans dag, har vi både designat och utvecklat på uppdrag av Wyatt. Kampanjen ligger på Bilddagboken och går ut på att användarna tar ett pussfoto med webbkameran och skickar dessa pussar till sina vänner. Om den skickade pussen blir besvarad har paret en chans att vinna biljetter till den bioaktuella filmen Valentine&#8217;s Day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#mer-valentines-day/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebird &#8211; a sound visualization</title>
		<link>http://www.x-com.se/labs/flash/firebird-a-sound-visualization.html</link>
		<comments>http://www.x-com.se/labs/flash/firebird-a-sound-visualization.html#comments</comments>
		<pubDate>Fri, 22 Jan 2010 10:12:18 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[firebird]]></category>
		<category><![CDATA[gabriel]]></category>
		<category><![CDATA[peter]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[spectrum]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=715</guid>
		<description><![CDATA[The other day I stumbled upon a minimalistic music video ...]]></description>
			<content:encoded><![CDATA[<p>The other day I stumbled upon a minimalistic music video by Peter Gabriel called <a title="Der Rhythmus der Hitze" href="http://www.youtube.com/v/wv4_g5pmFPQ" rel="shadowbox[post-715];player=swf;width=640;height=385;">Der Rhythmus der Hitze</a>. As I&#8217;ve never had the chance to experiment with the Spectrum-functionality in AS3 I thought this would be a perfect first example as I found the birdlike visuals were quite nice and mesmerizing. Here&#8217;s the result.</p>
<p><a rel="shadowbox;width=700;height=550" href="/wp-content/uploads/2010/01/Firebird.swf"><img title="Firebird" src="/wp-content/uploads/2010/01/firebird_preview.jpg" alt="Firebird" width="600" height="340" /></a></p>
<p><span id="more-715"></span></p>
<div class="codesnip-container-wrapper">
<div class="codesnip-container-innerwrapper">
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">package<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">GradientType</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">filters</span>.<span class="me1">GlowFilter</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">Matrix</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">media</span>.<span class="me1">SoundMixer</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">utils</span>.<span class="me1">ByteArray</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> se.<span class="me1">xcom</span>.<span class="kw3">math</span>.<span class="me1">DegreesVector</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">class</span> Firebird <span class="kw3">extends</span> Sprite<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> const BAR_WIDTH:<span class="kw3">int</span> = <span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> ba:ByteArray;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> matrix:Matrix;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> degrees:DegreesVector;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> counter:<span class="kw3">int</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">var</span> aColours:<span class="kw3">Array</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Firebird<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">super</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aColours = <span class="br0">&#91;</span>0xFFFFFF,0xFFFF33,0xFF2200,0xFF0000<span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ba = <span class="kw2">new</span> ByteArray<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; matrix = <span class="kw2">new</span> Matrix<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; degrees = <span class="kw2">new</span> DegreesVector<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">filters</span> = <span class="br0">&#91;</span><span class="kw2">new</span> GlowFilter<span class="br0">&#40;</span>0xFF2211,1,20,30,3,2<span class="br0">&#41;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">this</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">ENTER_FRAME</span>,onFrameTick<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">private</span> <span class="kw2">function</span> onFrameTick<span class="br0">&#40;</span><span class="kw3">e</span>:Event<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> enhance:<span class="kw3">Number</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> barHeight:<span class="kw3">Number</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> posY:<span class="kw3">Number</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// get new ByteArray from soundmixer</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SoundMixer.<span class="me1">computeSpectrum</span><span class="br0">&#40;</span>ba,<span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// setting up gradientcolours. Using the aColours gives us the flexibility</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// &nbsp;to switch between different colours in the future if we would like to. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> gradientColours:<span class="kw3">Array</span> = <span class="br0">&#91;</span>aColours<span class="br0">&#91;</span>3<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>2<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>1<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>0<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>1<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>2<span class="br0">&#93;</span>, aColours<span class="br0">&#91;</span>3<span class="br0">&#93;</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">with</span><span class="br0">&#40;</span>graphics<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">clear</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span>=<span class="nu0">0</span>; i<span class="sy0">&lt;</span><span class="nu0">256</span>; i+=BAR_WIDTH<span class="br0">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// enhance largen the shape towards the middle. The first 60 bars will be enhanced </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// (simply to create the birdhead)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enhance = 60-i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enhance = <span class="br0">&#40;</span>enhance <span class="sy0">&lt;</span>0<span class="br0">&#41;</span>?0:enhance;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// now the bar is moved in Y-axis using a normal sinus curve. (Using a faster custom Sine-class)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; posY = degrees.<span class="me1">fastSin</span><span class="br0">&#40;</span><span class="kw3">int</span><span class="br0">&#40;</span>counter+i<span class="sy0">*</span>0.65<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="nu0">160</span>;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// bar height is calculated using the sound spectrum in the ByteArray. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// It is multiplied and enhanced if close to the middle </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; barHeight = <span class="br0">&#40;</span>ba.<span class="me1">readFloat</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">*</span> <span class="br0">&#40;</span>100+enhance<span class="br0">&#41;</span><span class="br0">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// creating the gradientbox set up gradientfill.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; matrix.<span class="me1">createGradientBox</span><span class="br0">&#40;</span>BAR_WIDTH,2<span class="sy0">*</span>barHeight,1.57075,0,-barHeight-posY<span class="sy0">*</span>0.5<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">beginGradientFill</span><span class="br0">&#40;</span>GradientType.<span class="me1">LINEAR</span>,gradientColours,<span class="br0">&#91;</span>0,1,1,1,1,1,0<span class="br0">&#93;</span>,<span class="br0">&#91;</span>0,50,110,128,146,205,255<span class="br0">&#93;</span>,matrix<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Draing 2 bars. One for each wing. Adding BAR_WIDTH on the left to avoid a gap in the middle.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drawRect<span class="br0">&#40;</span>i, -barHeight-posY<span class="sy0">*</span>0.5, BAR_WIDTH, 2<span class="sy0">*</span>barHeight<span class="br0">&#41;</span>; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drawRect<span class="br0">&#40;</span>-i+BAR_WIDTH, -barHeight-posY<span class="sy0">*</span>0.5, BAR_WIDTH, 2<span class="sy0">*</span>barHeight<span class="br0">&#41;</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// adding counter so the Sine-curve starts one step away next frame (result: the wave motion)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter+=<span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
</div>
</div>
<p>The code is quite straight forward.<br />
Every single frame the SoundMixer creates a ByteArray containing Numbers from 0 &#8211; 1 which is used in order to create the bars/lines. The only thing that is custom is the DegreeVector class that converts all Radian to Degrees (as I&#8217;m no fan of radians). What it also does is to use a precalculated array of Sine-values that speedens up the sine-calculations a bit. This is of course not necessary and you could easily use the normal Math.sin functions to get the same result.</p>
<p>Just build a Firebird object in your main class, add it to stage and start playing any sound and Phoenix will manifest itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/labs/flash/firebird-a-sound-visualization.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Vi är nominerade till Årets Företag 2010 i Eskilstuna</title>
		<link>http://www.x-com.se/aktuellt/vi-ar-nominerade-till-arets-foretag-2009-i-eskilstuna.html</link>
		<comments>http://www.x-com.se/aktuellt/vi-ar-nominerade-till-arets-foretag-2009-i-eskilstuna.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 11:03:37 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=635</guid>
		<description><![CDATA[Vi bockar och bugar för nomineringen till Årets Företag 2010 ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://devx.x-com.se/wp-content/uploads/2010/01/marknadsplats_300x200.jpg" alt="Marknadsplats 2010" title="Marknadsplats 2010" width="300" height="200" class="alignright size-full wp-image-636" />Vi bockar och bugar för nomineringen till Årets Företag 2010 i Eskilstuna. Det är Nyföretagarcentrum, Företagarna och Marknadsföreningen som varje år anordnar Marknadsplats där även Årets Nyföretagare och Årets Marknadsförare utses. Vinnarna utses den 11 februari i Stadshuset så håll tummarna till dess.</p>
<p><a href="http://www.marknadsplats.nu">http://www.marknadsplats.nu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vi-ar-nominerade-till-arets-foretag-2009-i-eskilstuna.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archus Arkitekter &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-webbplats#comments</comments>
		<pubDate>Fri, 08 Jan 2010 16:37:14 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flash AS3]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=608</guid>
		<description><![CDATA[Vi har tagit fram en ny webbplats åt västeråsföretaget Archus ...]]></description>
			<content:encoded><![CDATA[<p>Vi har tagit fram en ny webbplats åt västeråsföretaget Archus Arkitekter. De själva har gjort det mesta av designarbetet och vi har gjort det tekniska. Sajten bygger på Open Source CMS:et <a href="http://www.umbraco.org">Umbraco</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#archus-arkitekter-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>God Jul &amp; Gott Nytt År!</title>
		<link>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar.html</link>
		<comments>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar.html#comments</comments>
		<pubDate>Tue, 15 Dec 2009 08:30:02 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=543</guid>
		<description><![CDATA[I år har vi valt att skänka en slant till ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Cancerfondens Julgåva 2009" src="/wp-content/uploads/2010/01/cancerfonden2009.jpg" alt="Cancerfondens Julgåva 2009" width="300" height="200" />I år har vi valt att skänka en slant till Cancerfonden istället för att bjuda våra kunder och samarbetspartners på ett julspel som vi har gjort tidigare år. Cancer är en hemsk sjukdom som allt fler drabbas av. Vår slant kanske kan hjälpa en liten bit på väg till botemedlet.</p>
<p><a href="http://www.cancerfonden.se">Skänk en slant du också!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/god-jul-gott-nytt-ar.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acne Production &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#acne-production-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#acne-production-webbplats#comments</comments>
		<pubDate>Mon, 14 Dec 2009 19:18:34 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=623</guid>
		<description><![CDATA[Våra vänner på Acne Digital och Acne Film har gått ...]]></description>
			<content:encoded><![CDATA[<p>Våra vänner på Acne Digital och Acne Film har gått samman och bildat Acne Production. Vi hjälpte dem med att programmera den nya webbplatsen. De själva har gjort designen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#acne-production-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brämhults &#8211; Sajten med kort hållbarhet!</title>
		<link>http://www.x-com.se/produktioner/webbplatser#bramhults-sajten-med-kort-hallbarhet</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#bramhults-sajten-med-kort-hallbarhet#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:38:40 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flash AS3]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=460</guid>
		<description><![CDATA[Tillsammans med reklambyrån Volontaire har vi utvecklat en ny webbplats ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Volontaire har vi utvecklat en ny webbplats åt juiceföretaget Brämhults. Deras färskpressade juicer har en hållbarhet på 18 dagar och det gäller även webbplatsen. Var 18:e dag förnyas den med ett nytt tema. Vi har utvecklat ett flexibelt system där kunden med relativt enkla grepp kan göra stora förändringar på sajten. Lösningen bygger på Open Source CMS:et Umbraco.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#bramhults-sajten-med-kort-hallbarhet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ännu fler priser!</title>
		<link>http://www.x-com.se/aktuellt/annu-fler-priser.html</link>
		<comments>http://www.x-com.se/aktuellt/annu-fler-priser.html#comments</comments>
		<pubDate>Thu, 03 Dec 2009 13:58:53 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=371</guid>
		<description><![CDATA[I helgen avgjordes reklamtävlingen Epica Awards 2009 och våra produktioner ...]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2009/12/aktuellt_epica-300x200.jpg" alt="Epica Awards" title="Epica Awards" width="300" height="200" class="alignright" />I helgen avgjordes reklamtävlingen Epica Awards 2009 och våra produktioner för Ikea &#8211; Swedens Sleepiest Contest (F&#038;B/B-Reel) och Tele2 &#8211; Mobilt Internet Live (F&#038;B) vann priser. Silver till Ikea och brons till Tele2. Grattis till oss och alla andra medverkande!</p>
<p>Läs mer på <a href="http://www.epica-awards.com/pages/results/2009/agency01029.html">Epica-Awards.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/annu-fler-priser.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leine &amp; Linde &#8211; Produktpresentation</title>
		<link>http://www.x-com.se/produktioner/kampanjer#leine-linde-produktpresentation</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#leine-linde-produktpresentation#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:00:59 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=140</guid>
		<description><![CDATA[Tillsammans med strängnäsföretaget Furillo, som står för designen, har vi ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med strängnäsföretaget Furillo, som står för designen, har vi skapat en interaktiv presentation till Leine &#038; Lindes nya pulsgivare. Denna interaktiva presentation, översatt till flera olika språk, är tänkt att köras på pekskärm på olika mässor runt om i världen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#leine-linde-produktpresentation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vi har vunnit pris!</title>
		<link>http://www.x-com.se/aktuellt/vi-har-vunnit-pris.html</link>
		<comments>http://www.x-com.se/aktuellt/vi-har-vunnit-pris.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 14:33:15 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=387</guid>
		<description><![CDATA[I helgen avgjordes Eurobest 2009 &#8211; The European Advertising Festival ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://devx.x-com.se/wp-content/uploads/2009/11/aktuellt_eurobest_300_200.jpg" alt="Eurobest" title="Eurobest" width="300" height="200" class="alignright" />I helgen avgjordes Eurobest 2009 &#8211; The European Advertising Festival i Amsterdam. Våra produktioner för Ikea &#8211; Swedens Sleepiest Contest (F&#038;B/B-Reel) och Tele2 &#8211; Mobile Internet Live (F&#038;B) fanns med på shortlisten. Det blev tillslut ett silver för Tele2. Kul och grattis till alla medverkande!</p>
<p>Läs mer på <a href="http://www.eurobest.com/winners/2009/interactive/index.cfm?award=3">Eurobest.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vi-har-vunnit-pris.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Välkommen Jesper!</title>
		<link>http://www.x-com.se/aktuellt/valkommen-jesper.html</link>
		<comments>http://www.x-com.se/aktuellt/valkommen-jesper.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 08:35:53 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=571</guid>
		<description><![CDATA[Vi är mycket glada över att lyckats locka hit Jesper ...]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/01/jesper.jpg" alt="Jesper Jonsson" title="Jesper Jonsson" width="300" height="200" class="alignright" />Vi är mycket glada över att lyckats locka hit Jesper Jonsson. Han kommer närmast från det egna företaget Morning Lemon där han bland annat har jobbat med iPhone applikationer och webbprogrammering. Han kommer främst hjälpa oss med webbprogrammering och systemutveckling. Välkommen!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/valkommen-jesper.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vi samarbetar med två av världens sju bästa byråer!</title>
		<link>http://www.x-com.se/aktuellt/vi-samarbetar-med-tva-av-varldens-sju-basta-byraer.html</link>
		<comments>http://www.x-com.se/aktuellt/vi-samarbetar-med-tva-av-varldens-sju-basta-byraer.html#comments</comments>
		<pubDate>Sun, 01 Nov 2009 10:05:31 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=51</guid>
		<description><![CDATA[Amerikanska Creativity-Online rankar våra kompisar på ACNE Production och B-Reel ...]]></description>
			<content:encoded><![CDATA[<p>Amerikanska Creativity-Online rankar våra kompisar på ACNE Production och B-Reel som två av världens sju bästa byråer. Med på listan finns även ytterligare två svenska företag, Perfect Fools och North Kingdom, så Sverige dominerar rejält i den digitala branschen.</p>
<p>Läs mer på <a href="http://www.resume.se/nyheter/2009/10/28/sverige-bast-pa-digitalt/index.xml">Resume.se</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/vi-samarbetar-med-tva-av-varldens-sju-basta-byraer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tele2 &#8211; Mobilt Internet Live</title>
		<link>http://www.x-com.se/produktioner/kampanjer#tele2-mobilt-internet-live</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#tele2-mobilt-internet-live#comments</comments>
		<pubDate>Mon, 12 Oct 2009 12:02:11 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=68</guid>
		<description><![CDATA[Tillsammans med Forsman &#038; Bodenfors har vi tagit fram en ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Forsman &#038; Bodenfors har vi tagit fram en kampanj för Tele2 Mobilt Internet &#8211; Årets jobbigaste test. Reportern Olle Garp livesänder 8 timmar om dagen, i en hel vecka, via mobilt internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#tele2-mobilt-internet-live/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ving &#8211; Thailand</title>
		<link>http://www.x-com.se/produktioner/kampanjer#ving-thailand</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#ving-thailand#comments</comments>
		<pubDate>Tue, 25 Aug 2009 13:23:07 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=62</guid>
		<description><![CDATA[På uppdrag av reklambyrån Forsman &#038; Bodenfors har vi ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av reklambyrån Forsman &#038; Bodenfors har vi gjort kampanjsajt och webbannonser för Vings senaste Thailand-kampanj.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#ving-thailand/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Välkommen Jani!</title>
		<link>http://www.x-com.se/aktuellt/valkommen-jani.html</link>
		<comments>http://www.x-com.se/aktuellt/valkommen-jani.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:00:52 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=579</guid>
		<description><![CDATA[Nu är vi fem anställda igen och vårat senaste tillskott ...]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/01/jani.jpg" alt="Jani Muikku" title="Jani Muikku" width="300" height="200" class="alignright" />Nu är vi fem anställda igen och vårat senaste tillskott heter Jani Muikku. Han kommer främst jobba med webbprogrammering och bygga webbplatser, men även en del design. Välkommen!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/valkommen-jani.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boxer &#8211; Vinn en glass!</title>
		<link>http://www.x-com.se/produktioner/kampanjer#boxer-vinn-en-glass</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#boxer-vinn-en-glass#comments</comments>
		<pubDate>Thu, 25 Jun 2009 13:21:31 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=86</guid>
		<description><![CDATA[Tillsammans med reklambyrån AbbyNorm och Stopp ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån AbbyNorm och produktionsbolaget Stopp har vi gjort en frågesport där 50 vinnare varje dag får en glasscheck via SMS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#boxer-vinn-en-glass/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IKEA &#8211; Sveriges Tröttaste Tävling</title>
		<link>http://www.x-com.se/produktioner/kampanjer#ikea-sveriges-trottaste-tavling</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#ikea-sveriges-trottaste-tavling#comments</comments>
		<pubDate>Wed, 24 Jun 2009 14:00:53 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=27</guid>
		<description><![CDATA[Tillsammans med Ikeas reklambyrå Forsman &#038; Bodenfors och produktionsbolaget B-Reel ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Ikeas reklambyrå Forsman &#038; Bodenfors och produktionsbolaget B-Reel har vi tagit fram webbplats och webbannonser till lanseringen av nya sängsortimentet Sultan.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#ikea-sveriges-trottaste-tavling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transavia &#8211; Wake up call</title>
		<link>http://www.x-com.se/produktioner/kampanjer#transavia-wake-up-call</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#transavia-wake-up-call#comments</comments>
		<pubDate>Tue, 09 Jun 2009 14:11:31 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=106</guid>
		<description><![CDATA[Tillsammans med reklambyrån AD&#038;D har vi producerat en ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån AD&#038;D har vi producerat en kampanj för det holländska flygbolaget Transavia.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#transavia-wake-up-call/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CoCo form &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#coco-form-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#coco-form-webbplats#comments</comments>
		<pubDate>Tue, 09 Jun 2009 07:00:17 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=118</guid>
		<description><![CDATA[Vi har tagit fram en ny webbplats åt våra vänner på CoCo form ...]]></description>
			<content:encoded><![CDATA[<p>Vi har tagit fram en ny webbplats åt våra vänner på CoCo form.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#coco-form-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mälarvåningar &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#malarvaningar-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#malarvaningar-webbplats#comments</comments>
		<pubDate>Tue, 09 Jun 2009 06:08:52 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=126</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en ny webbplats åt Mälarvåningar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#malarvaningar-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BoEL &#8211; Elförbrukning</title>
		<link>http://www.x-com.se/produktioner/ovrigt#boel-elforbrukning</link>
		<comments>http://www.x-com.se/produktioner/ovrigt#boel-elforbrukning#comments</comments>
		<pubDate>Thu, 21 May 2009 14:15:20 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Övrigt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=706</guid>
		<description><![CDATA[Interactive Institute har anlitat oss för att bygga en applikation ...]]></description>
			<content:encoded><![CDATA[<p>Interactive Institute har anlitat oss för att bygga en applikation som grafiskt visar elförbrukningen i ett antal utvalda hushåll. Experimentet går ut på att testa om hushållens elförbrukning minskar om de kan enkelt kan se sin egen och grannarnas förbrukning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/ovrigt#boel-elforbrukning/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Välkommen Patrik!</title>
		<link>http://www.x-com.se/aktuellt/valkommen-patrik.html</link>
		<comments>http://www.x-com.se/aktuellt/valkommen-patrik.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 09:02:15 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Aktuellt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=582</guid>
		<description><![CDATA[Från och med 9 mars jobbar Patrik Adolfsson hos oss. ...]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/01/patrik.jpg" alt="Patrik" title="Patrik" width="300" height="200" class="alignright" />Från och med 9 mars jobbar Patrik Adolfsson hos oss. Han kommer främst jobba med webb- och systemutveckling, men även projektledning. Han har ca 10 års erfarenhet från branschen och har jobbat med bland annat ving.se och nu senast Scanias IT-avdelning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/aktuellt/valkommen-patrik.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVT Play</title>
		<link>http://www.x-com.se/produktioner/kampanjer#svt-play</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#svt-play#comments</comments>
		<pubDate>Mon, 23 Feb 2009 15:47:26 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=133</guid>
		<description><![CDATA[På uppdrag av F&#038;B har vi gjort annonser för lanseringen ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av F&#038;B har vi gjort annonser för lanseringen av SVT:s nya webb-tv SVT Play.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#svt-play/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red Collar Project</title>
		<link>http://www.x-com.se/produktioner/webbplatser#red-collar-project</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#red-collar-project#comments</comments>
		<pubDate>Mon, 16 Feb 2009 09:41:01 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=148</guid>
		<description><![CDATA[På uppdrag av MnO International har vi tagit fram en ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av MnO International har vi tagit fram en ny webbplats för klädmärket Red Collar Project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#red-collar-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LG &#8211; Chatt Up</title>
		<link>http://www.x-com.se/produktioner/spel#lg-chatt-up</link>
		<comments>http://www.x-com.se/produktioner/spel#lg-chatt-up#comments</comments>
		<pubDate>Mon, 16 Feb 2009 09:02:00 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=153</guid>
		<description><![CDATA[Tillsammans med Wyatt Creative har vi gjort ett chattspel åt ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Wyatt Creative har vi gjort ett chattspel åt LG i samband med att deras nya telefon LG KS360 lanserades. Spelet integrerades i bilddagboken.se.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#lg-chatt-up/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ving &#8211; Aruba</title>
		<link>http://www.x-com.se/produktioner/kampanjer#ving-aruba</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#ving-aruba#comments</comments>
		<pubDate>Mon, 16 Feb 2009 07:09:03 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=161</guid>
		<description><![CDATA[På uppdrag av Forsman &#038; Bodenfors har vi producerat ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av Forsman &#038; Bodenfors har vi producerat kampanjsajt för resmålet Aruba.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#ving-aruba/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eskilstuna 350 år &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#eskilstuna-350-ar-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#eskilstuna-350-ar-webbplats#comments</comments>
		<pubDate>Sun, 15 Feb 2009 15:16:54 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=171</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en webbplats för Eskilstunas 350 års jubileum.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#eskilstuna-350-ar-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Säljtävling &#8211; Guldrushen 2009</title>
		<link>http://www.x-com.se/produktioner/spel#saljtavling-guldrushen-2009</link>
		<comments>http://www.x-com.se/produktioner/spel#saljtavling-guldrushen-2009#comments</comments>
		<pubDate>Sun, 25 Jan 2009 13:19:51 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=785</guid>
		<description><![CDATA[Länsförsäkringar Bergslagen har varje år en intern säljtävling. Personalen kan ...]]></description>
			<content:encoded><![CDATA[<p>Länsförsäkringar Bergslagen har varje år en intern säljtävling. Personalen kan på ett grafiskt sätt se hur de ligger till i tävlingen och sporras till att sälja mer för att uppnå uppsatta mål.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#saljtavling-guldrushen-2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radio Sörmland P4</title>
		<link>http://www.x-com.se/produktioner/ovrigt#radio-sormland-p4</link>
		<comments>http://www.x-com.se/produktioner/ovrigt#radio-sormland-p4#comments</comments>
		<pubDate>Fri, 05 Dec 2008 12:33:22 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Övrigt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=177</guid>
		<description><![CDATA[Radio Sörmland har anlitat X-Com för en föreläsning ...]]></description>
			<content:encoded><![CDATA[<p>Radio Sörmland har anlitat X-Com för en föreläsning och workshopserie på temat webbinspiration. Tanken och förhoppningen är att de ska få upp ögonen för webben och lära sig utnyttja dess möjligheter och fördelar i den dagliga verksamheten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/ovrigt#radio-sormland-p4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tenzing &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#tenzing-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#tenzing-webbplats#comments</comments>
		<pubDate>Fri, 05 Dec 2008 09:11:42 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=195</guid>
		<description><![CDATA[Tillsammans med webbyrån Deasign har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med webbyrån Deasign har vi tagit fram en ny webbplats åt Tenzing AB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#tenzing-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Westermo &#8211; MDR Release</title>
		<link>http://www.x-com.se/produktioner/kampanjer#westermo-mdr-release</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#westermo-mdr-release#comments</comments>
		<pubDate>Fri, 05 Dec 2008 08:38:28 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=201</guid>
		<description><![CDATA[När Westermo Teleindustri lanserade en ny 3G-router ...]]></description>
			<content:encoded><![CDATA[<p>När Westermo Teleindustri lanserade en ny 3G-router stod vi för webbannonserna.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#westermo-mdr-release/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wasa Sandwich</title>
		<link>http://www.x-com.se/produktioner/spel#wasa-sandwich</link>
		<comments>http://www.x-com.se/produktioner/spel#wasa-sandwich#comments</comments>
		<pubDate>Thu, 30 Oct 2008 14:13:42 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=208</guid>
		<description><![CDATA[Tillsammans med Wyatt Creative har vi gjort ett spel för ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Wyatt Creative har vi gjort ett spel för Wasa Sandwich nya smak Skogens Skatt. Vinnaren blir kändis för en dag med egen annons på bilddagboken.se.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#wasa-sandwich/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sälj mer &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#salj-mer-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#salj-mer-webbplats#comments</comments>
		<pubDate>Sat, 18 Oct 2008 20:23:03 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=676</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en ny webbplats åt Pia Nilsson på Sälj mer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#salj-mer-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burridge Communication &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#burridge-communication-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#burridge-communication-webbplats#comments</comments>
		<pubDate>Sat, 18 Oct 2008 20:18:45 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=674</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en ny webbplats åt Burridge Communication.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#burridge-communication-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tele2 &#8211; Idol Quiz</title>
		<link>http://www.x-com.se/produktioner/spel#tele2-idol-quiz</link>
		<comments>http://www.x-com.se/produktioner/spel#tele2-idol-quiz#comments</comments>
		<pubDate>Wed, 15 Oct 2008 15:34:22 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=227</guid>
		<description><![CDATA[Årets idolsäsong är igång för fullt och sponsras i år av bland annat Tele2 ...]]></description>
			<content:encoded><![CDATA[<p>Årets idolsäsong är igång för fullt och sponsras i år av bland annat Tele2. På uppdrag av I Branding har vi tagit fram en Idol Quiz där man kan testa sina idolkunskaper och vinna fina priser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#tele2-idol-quiz/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adidas &#8211; Stella McCartney</title>
		<link>http://www.x-com.se/produktioner/kampanjer#adidas-stella-mccartney</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#adidas-stella-mccartney#comments</comments>
		<pubDate>Wed, 15 Oct 2008 09:02:47 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=233</guid>
		<description><![CDATA[I våras hjälpte vi Foreign med att bygga en sajt för Stella ...]]></description>
			<content:encoded><![CDATA[<p>I våras hjälpte vi Foreign med att bygga en sajt för Stella McCartneys vårkollektion. Nu är det höst och nu är sajten uppdaterad med höstkollektionen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#adidas-stella-mccartney/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parken Zoo &#8211; Tyckotryckomaten</title>
		<link>http://www.x-com.se/produktioner/ovrigt#parken-zoo-tyckotryckomaten</link>
		<comments>http://www.x-com.se/produktioner/ovrigt#parken-zoo-tyckotryckomaten#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:52:28 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Övrigt]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=697</guid>
		<description><![CDATA[Vi och våra vänner på CoCo form har utvecklat en ...]]></description>
			<content:encoded><![CDATA[<p>Vi och våra vänner på CoCo form har utvecklat en &#8220;Tyckotryckomat&#8221; åt Parken Zoo. CoCo form skapade ett träd där vi byggde in en dator och en webbkamera. När besökaren tryckte på den stora blomman startades inspelningen och de kunde berätta om hur dagen på Parken Zoo hade varit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/ovrigt#parken-zoo-tyckotryckomaten/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beckers &#8211; Målarskolan</title>
		<link>http://www.x-com.se/produktioner/kampanjer#beckers-malarskolan</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#beckers-malarskolan#comments</comments>
		<pubDate>Tue, 13 May 2008 14:47:32 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=257</guid>
		<description><![CDATA[På uppdrag av Deasign har vi utvecklat en målarskola ...]]></description>
			<content:encoded><![CDATA[<p>Ursprungligen på uppdrag av Foreign har vi gjort en målarskola för Beckers. Vidareutvecklingen har skett tillsammans med Deasign.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#beckers-malarskolan/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Volvo &#8211; Miljö</title>
		<link>http://www.x-com.se/produktioner/kampanjer#volvo-miljo</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#volvo-miljo#comments</comments>
		<pubDate>Tue, 13 May 2008 09:46:47 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=265</guid>
		<description><![CDATA[På uppdrag av Forsman &#038; Bodenfors har vi gjort annonser ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av Forsman &#038; Bodenfors har vi gjort annonser för Volvos kampanj för deras miljöarbete.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#volvo-miljo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tele2 &#8211; OS Quiz</title>
		<link>http://www.x-com.se/produktioner/spel#tele2-os-quiz</link>
		<comments>http://www.x-com.se/produktioner/spel#tele2-os-quiz#comments</comments>
		<pubDate>Thu, 17 Apr 2008 13:06:40 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Spel]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=323</guid>
		<description><![CDATA[Tele2 är teamsponsor till den Svenska OS-truppen ...]]></description>
			<content:encoded><![CDATA[<p>Tele2 är teamsponsor till den Svenska OS-truppen som i sommar åker till sommar-OS i Peking. För att uppmärksamma det får alla Tele2:s kunder vara med och tävla om en resa till Peking.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/spel#tele2-os-quiz/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restaurang P-2 &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#restaurang-p-2-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#restaurang-p-2-webbplats#comments</comments>
		<pubDate>Thu, 17 Apr 2008 08:33:50 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=356</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en ny webbplats åt våra grannar P-2. Vi valde en lösning där vi kunde lyfta fram de fina bilder som fotograf Joakim Serrander tagit på den nyrenoverade lokalen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#restaurang-p-2-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Volvo C30 &#8211; Mönster</title>
		<link>http://www.x-com.se/produktioner/kampanjer#volvo-c30-monster</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#volvo-c30-monster#comments</comments>
		<pubDate>Fri, 04 Apr 2008 15:06:30 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=595</guid>
		<description><![CDATA[På uppdrag av reklambyrån Forsman &#038; Bodenfors har vi gjort ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av reklambyrån Forsman &#038; Bodenfors har vi gjort webbannonser till lanseringen av nya Volvo C30 med mönster.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#volvo-c30-monster/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mälarbåten &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#malarbaten-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#malarbaten-webbplats#comments</comments>
		<pubDate>Tue, 18 Mar 2008 13:10:57 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=529</guid>
		<description><![CDATA[Tillsammans med Ovland and Friends har vi gjort en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Ovland and Friends har vi gjort en ny webbplats åt Mälarbåten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#malarbaten-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Com Hem &#8211; Under stjärnorna</title>
		<link>http://www.x-com.se/produktioner/kampanjer#com-hem-under-stjarnorna</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#com-hem-under-stjarnorna#comments</comments>
		<pubDate>Sat, 15 Dec 2007 15:12:48 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=680</guid>
		<description><![CDATA[Tillsammans med Foreign har vi gjort en kampanj för Com ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med Foreign har vi gjort en kampanj för Com Hem. Kampanjen lanserades stort i samband med Lucia 2007 och vi gjorde kampanjsajten och webbannonser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#com-hem-under-stjarnorna/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eskilstuna Logistik</title>
		<link>http://www.x-com.se/produktioner/webbplatser#eskilstuna-logistik</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#eskilstuna-logistik#comments</comments>
		<pubDate>Fri, 26 Oct 2007 11:04:10 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=826</guid>
		<description><![CDATA[Tillsammans med reklambyrån Ovland and Friends har vi tagit fram ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Ovland and Friends har vi tagit fram en ny webbplats åt Eskilstuna Logistik. Kampanjen ska hjälpa till att locka fler företag med logistikbehov till Eskilstuna.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#eskilstuna-logistik/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work Agent AB</title>
		<link>http://www.x-com.se/produktioner/webbplatser#work-agent-ab</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#work-agent-ab#comments</comments>
		<pubDate>Fri, 21 Sep 2007 14:58:25 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=712</guid>
		<description><![CDATA[Vi har gjort en ny webbplats åt rekryteringsföretaget Work Agent ...]]></description>
			<content:encoded><![CDATA[<p>Vi har gjort en ny webbplats åt rekryteringsföretaget Work Agent AB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#work-agent-ab/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Energikontoret &#8211; Webbplats</title>
		<link>http://www.x-com.se/produktioner/webbplatser#energikontoret-webbplats</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#energikontoret-webbplats#comments</comments>
		<pubDate>Tue, 18 Sep 2007 20:28:55 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=678</guid>
		<description><![CDATA[Tillsammans med reklambyrån Järv har vi tagit fram en ny ...]]></description>
			<content:encoded><![CDATA[<p>Tillsammans med reklambyrån Järv har vi tagit fram en ny webbplats åt Energikontoret i Mälardalen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#energikontoret-webbplats/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS &#8211; USA Kampanj</title>
		<link>http://www.x-com.se/produktioner/kampanjer#sas-usa-kampanj</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#sas-usa-kampanj#comments</comments>
		<pubDate>Fri, 08 Jun 2007 12:38:28 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=843</guid>
		<description><![CDATA[Vi har hjälp reklambyrån Pool med en kampanj för SAS.
]]></description>
			<content:encoded><![CDATA[<p>Vi har hjälp reklambyrån Pool med en kampanj för SAS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#sas-usa-kampanj/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swilkenbridge &#8211; Navigating your journey</title>
		<link>http://www.x-com.se/produktioner/webbplatser#swilkenbridge-navigating-your-journey</link>
		<comments>http://www.x-com.se/produktioner/webbplatser#swilkenbridge-navigating-your-journey#comments</comments>
		<pubDate>Mon, 07 May 2007 09:36:23 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Webbplatser]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=690</guid>
		<description><![CDATA[Vi har tagit fram en ny webbplats åt Swilkenbridge, ett ...]]></description>
			<content:encoded><![CDATA[<p>Vi har tagit fram en ny webbplats åt Swilkenbridge, ett väldigt framgångsrikt företag med affärsutveckling som verksamhet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/webbplatser#swilkenbridge-navigating-your-journey/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>adidas &#8211; Impossible Team</title>
		<link>http://www.x-com.se/produktioner/kampanjer#adidas-impossible-team</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#adidas-impossible-team#comments</comments>
		<pubDate>Mon, 22 May 2006 08:12:26 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=798</guid>
		<description><![CDATA[Inför Fotbolls-VM 2006 i Tyskland satsar Adidas hårt och vi ...]]></description>
			<content:encoded><![CDATA[<p>Inför Fotbolls-VM 2006 i Tyskland satsar Adidas hårt och vi har hjälpt deras digitala byrå Foreign med kampanjen Impossible Team. Kampanjen lanseras globalt på totalt 18 olika språk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#adidas-impossible-team/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intersport &#8211; adidas +F50 Tunit</title>
		<link>http://www.x-com.se/produktioner/kampanjer#intersport-adidas-f50-tunit</link>
		<comments>http://www.x-com.se/produktioner/kampanjer#intersport-adidas-f50-tunit#comments</comments>
		<pubDate>Wed, 01 Mar 2006 09:27:45 +0000</pubDate>
		<dc:creator>Per</dc:creator>
				<category><![CDATA[Kampanjer]]></category>

		<guid isPermaLink="false">http://devx.x-com.se/?p=809</guid>
		<description><![CDATA[På uppdrag av webbyrån Foreign uppdaterade vi sajten www.wherefootballstarts.com med ...]]></description>
			<content:encoded><![CDATA[<p>På uppdrag av webbyrån Foreign uppdaterade vi sajten www.wherefootballstarts.com med kampanjen +F50 Tunit. Sajten är en samproduktion mellan Intersport och Adidas och mycket av innehåller kommer från adidas.com/football.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x-com.se/produktioner/kampanjer#intersport-adidas-f50-tunit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

