<?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>Ghost23 Blog &#187; Stuff</title>
	<atom:link href="http://www.ghost23.de/category/stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghost23.de</link>
	<description>A blog about Flash and stuff</description>
	<lastBuildDate>Tue, 03 Jan 2012 15:21:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>DOM Event listener in GWT</title>
		<link>http://www.ghost23.de/2011/07/dom-event-listener-in-gwt/</link>
		<comments>http://www.ghost23.de/2011/07/dom-event-listener-in-gwt/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 13:52:19 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=551</guid>
		<description><![CDATA[Juten Tach, should you be scratching your head like i did, when trying to understand, how you would add an event listener to simple DOM elements in GWT, here&#8217;s how i do it currently: Element myDOMElement = Document.get&#40;&#41;.getElementById&#40;&#34;someDOMElement&#34;&#41;; Event.setEventListener&#40;myDOMElement, new EventListener&#40;&#41; &#123; &#160; @Override public void onBrowserEvent&#40;Event event&#41; &#123; // TODO Do crazy stuff here [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>should you be scratching your head like i did, when trying to understand, how you would add an event listener to simple DOM elements in GWT, here&#8217;s how i do it currently:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Element</span> myDOMElement <span style="color: #339933;">=</span> <span style="color: #003399;">Document</span>.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;someDOMElement&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">Event</span>.<span style="color: #006633;">setEventListener</span><span style="color: #009900;">&#40;</span>myDOMElement, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">EventListener</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	@Override
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onBrowserEvent<span style="color: #009900;">&#40;</span><span style="color: #003399;">Event</span> event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// TODO Do crazy stuff here</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">Event</span>.<span style="color: #006633;">sinkEvents</span><span style="color: #009900;">&#40;</span>myDOMElement, <span style="color: #003399;">Event</span>.<span style="color: #006633;">ONCLICK</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Note the last line here. Only once you&#8217;ve called sinkEvents(), do you really get the events for the particular event type(s).</p>
<p>I find this much more usable, than the nasty Event.addNativePreviewHandler() method, that they talk about in the GWT documentation, because you only get the event, you&#8217;re interested in.</p>
<p>In general it appears to me, that GWT is more geared towards using their components (or widgets), than working with the DOM directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2011/07/dom-event-listener-in-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brainbattle &#8211; emotiv, flash, union server</title>
		<link>http://www.ghost23.de/2011/05/brainbattle-emotiv-flash-union-server/</link>
		<comments>http://www.ghost23.de/2011/05/brainbattle-emotiv-flash-union-server/#comments</comments>
		<pubDate>Fri, 20 May 2011 10:13:14 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[AS3 / Flex]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=513</guid>
		<description><![CDATA[Tug-of-war type of game, using neuro-sensors from emotiv. Measures brain activity and calculates score points for two opponents.
Technologies involved: emotiv sdk, Unity Multiuser Server (Java), Flash / ActionScript3
This project took 2 days.]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>i was once again lucky enough to be able to build a fun little project. Brainbattle!</p>
<p><a href="http://www.ghost23.de/wp-content/gallery/brainbattle/brainbattle.jpg"><img class="alignnone size-full wp-image-518" title="Brainbattle" src="http://www.ghost23.de/wp-content/gallery/brainbattle/brainbattle.jpg" alt="The game Brainbattle in action" /></a></p>
<h3>But how did it all start?</h3>
<p>So, i occasionally give talks at the <a title="GoodSchool" href="http://good-school.de/" target="_blank">GoodSchool</a> about technology, internet and so on. The GoodSchool is a school for new ways of communication. All things digital, social, web, etc. and it is targeted at people in the marketing world. They have lots of different events all over the year. One is &#8220;camp digital&#8221;. Seven days packed full of information, inspiration and, of course, fun things.</p>
<p>So, Christian from the GoodSchool this time gave me two brain sensor headsets from <a title="Emotiv" href="http://www.emotiv.com/" target="_blank">emotiv</a> and asked me to build a little game with it. We decided to do a simple tug-of-war type of game.</p>
<h3>So, how does it work?</h3>
<p>So the setup is:</p>
<ul>
<li>Two emotiv epoc neuroheadsets (and their SDKs)</li>
<li>Two PCs connected via a twisted Ethernet cable</li>
<li>One <a title="Union Platform" href="http://www.unionplatform.com/" target="_blank">Union Platform server</a> (and the game control module build in Java)</li>
<li>Two little client flash apps, which take the converted signals from the emotiv SDKs and send it to the server (along with game controls)</li>
<li>One flash central Display app (seen in the pic above), that shows the game state.</li>
</ul>
<p>OK, the headsets connect two their respective PC over the air via a dongle. These headsets basically read the electric signals from your brain. As you can see in the picture below, the headset has a bunch of sensors, which need to be wet (using a saline solution). The tricky part is, that the sensors ideally touch the skin, which means, you have to fight a bit with the hair of the user to get out of the way.</p>
<p>These signals are read from a software SDK. Part of that SDK is a &#8220;training&#8221; program. There you can basically train &#8220;actions&#8221;. Like pull, push, up, down, vanish, show and lots of others. So you train a certain action, like &#8220;pull&#8221;. For 8 seconds you think about &#8220;pull&#8221; and the programm records the signals of your brain during that time. Then if you think that thought again later, the software recognizes the pattern and knows, that you think &#8220;pull&#8221;.</p>
<p><a href="http://www.ghost23.de/wp-content/gallery/brainbattle/emotiv-headset.jpg"><img class="alignnone size-full wp-image-515" title="emotiv-headset" src="http://www.ghost23.de/wp-content/gallery/brainbattle/emotiv-headset.jpg" alt="Emotiv Epoc neuroheadset close-up" /></a></p>
<p>Then there is a second little tool, called EmoKey. It is a simple converter. It converts an &#8220;action&#8221; into native Windows key events. So you define, that when the user thinks &#8220;pull&#8221;, it should emit a key event of the key &#8220;p&#8221;, for example. It can also do this continuously, lots of settings there.</p>
<p>So then i have a build a little client, which let&#8217;s you connect to the union server i have built, let the user click ready and also read those native key events. It then counts those incoming events per second and sends the result to server (every 500 ms).</p>
<p>The server (java) module takes those numbers from the two clients and calculates a force from it, being either positive or negative (depending on the numbers from client1 and client2). The server module of course also controls the various stages of the game, like client registering, game start, winning, and so on. The server is based on the union multiuser server, which is some nice piece of software and well documented. Its concept is around rooms and clients being in one or more rooms. The clients can send messages, set attributes on themselves or the rooms and so on. So i have created such a room, which has the game logic.</p>
<p>That game state is continuously send to the central flash display app, which is connected to the server as well (but only as an observer). It gets the force number and the game states and displays it.</p>
<p>So, that&#8217;s basically it. It took me about two and a half days to build it (and test it roughly). You can see a <a title="Brainbattle at goodschool" href="http://www.facebook.com/video/video.php?v=1764578721200" target="_blank">video of the game in action at facebook</a>.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-1-513">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-22" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.ghost23.de/wp-content/gallery/brainbattle/brainbattle.jpg" title=" " class="shutterset_set_1" >
								<img title="brainbattle" alt="brainbattle" src="http://www.ghost23.de/wp-content/gallery/brainbattle/thumbs/thumbs_brainbattle.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-28" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.ghost23.de/wp-content/gallery/brainbattle/emotiv-headset.jpg" title=" " class="shutterset_set_1" >
								<img title="emotiv-headset" alt="emotiv-headset" src="http://www.ghost23.de/wp-content/gallery/brainbattle/thumbs/thumbs_emotiv-headset.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2011/05/brainbattle-emotiv-flash-union-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jump &#8216;n run &#8211; Lego builders of infinity</title>
		<link>http://www.ghost23.de/2011/05/jump-n-run-lego-builders-of-infinity/</link>
		<comments>http://www.ghost23.de/2011/05/jump-n-run-lego-builders-of-infinity/#comments</comments>
		<pubDate>Mon, 09 May 2011 10:06:53 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Flash in general]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=506</guid>
		<description><![CDATA[Jump 'n Run game for Lego, produced by plan.net. This game consists of standalone game app and a microsite, where you can build levels with lego bricks and publish them.
Technologies involved: Flash / ActionScript3, Box2D
I was responsible for the development of the game. It took roughly about 1.5 months. This one won a silver lion in Cannes.]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>it doesn&#8217;t happen that often, that you work on a project for some time and finish it as smoothly as you started it. That happened to me while developing the jump &#8216;n run game <a title="Lego - builders of infinity" href="http://www.buildersofinfinity.com" target="_blank">Lego &#8211; builders of infinity</a>. Working with the nice people at Plan.net here in hamburg, we just finished this project together (If you like it, you might want to express that with a <a title="Lego - builders of infinity at FWA" href="http://thefwa.com/submissions/lego-builders-of-infinity" target="_blank">vote</a>?).</p>
<p><strong>Update:</strong> Nice: Just got notified, that the project won a <a title="Silver lion in Cannes" href="http://www.canneslions.com/work/direct/entry.cfm?entryid=23379&amp;award=3" target="_blank">silver lion in Cannes</a>!</p>
<p><strong>Update 2</strong>: Double nice: <a title="Site of the day at FWA." href="http://thefwa.com/site/lego-builders-of-infinity" target="_blank">FWA site of the day</a>.</p>
<p><strong>Update 3:</strong> Triple nice: <a title="Dope Award" href="http://www.dopeawards.com/?winner=2255&amp;cat=0" target="_blank">Dope Award</a></p>
<p><a href="http://www.ghost23.de/wp-content/uploads/lego-boi-1.jpg"><img class="size-full wp-image-507 alignnone" title="Lego - builders of infinity" src="http://www.ghost23.de/wp-content/gallery/legojump/lego-boi-1.jpg" alt="" /></a></p>
<p>This took roughly two months. It&#8217;s based on Flash Player 10 and uses the Box2d wck alchemy port. Its basically two apps: the game and the microsite. You can embed the game in your own website or blog, if you like.</p>
<p>The whole project consists of 103 ActionScript files (mostly classes) and around 6640 lines of code (no comments, no blanks, no libs).</p>
<p><a href="http://www.ghost23.de/wp-content/uploads/lego-boi-2.jpg"><img class="alignnone size-full wp-image-508" title="Lego - builders of infinity" src="http://www.ghost23.de/wp-content/gallery/legojump/lego-boi-2.jpg" alt="" /></a></p>
<p>The most challenging thing was, that Box2D has issues with letting boxes slide over a set of other boxes. From time to time, the box sticks at the edge from one underlying box to another, even if they are perfectly aligned. I first used the &#8220;normal&#8221; Box2D Flash port, but as it seems, there has not been a lot of development going on there, lately. So i switched to the Box2D wck alchemy port, which requires Flash Player 10. That port is more up to date with the original C implementation and thus can take advantage of some changes, which help fix the sliding issue. You can now cut off the corners of your boxes and thus let it slide over the corners of two adjacent boxes (which actually don&#8217;t exist, but as i said, box2d thinks they do exist). This trick does not work in the old &#8220;normal&#8221; Box2D Flash port.</p>
<p>Hope you enjoy the game.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-3-506">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-39" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.ghost23.de/wp-content/gallery/legojump/lego-boi-1.jpg" title=" " class="shutterset_set_3" >
								<img title="lego-boi-1" alt="lego-boi-1" src="http://www.ghost23.de/wp-content/gallery/legojump/thumbs/thumbs_lego-boi-1.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-42" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.ghost23.de/wp-content/gallery/legojump/lego-boi-2.jpg" title=" " class="shutterset_set_3" >
								<img title="lego-boi-2" alt="lego-boi-2" src="http://www.ghost23.de/wp-content/gallery/legojump/thumbs/thumbs_lego-boi-2.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2011/05/jump-n-run-lego-builders-of-infinity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box2D wck together with ND2D</title>
		<link>http://www.ghost23.de/2011/04/box2d-wck-together-with-nd2d/</link>
		<comments>http://www.ghost23.de/2011/04/box2d-wck-together-with-nd2d/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 17:59:54 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[AS3 / Flex]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[molehill]]></category>
		<category><![CDATA[nd2d]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=501</guid>
		<description><![CDATA[Juten Tach, since i a) was working quite a lot with Box2D lately b) am sitting next to Lars (aka nulldesign) today we had the idea to combine the Box2D alchemy port with Lars&#8217; ND2D graphics engine. The result involved lots of basketballs Caution: You need the Flash Player incubator build for this to run: [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>since i</p>
<p>a) was working quite a lot with Box2D lately</p>
<p>b) am sitting next to Lars (aka <a href="http://www.nulldesign.de" target="_blank">nulldesign</a>)</p>
<p>today we had the idea to combine the Box2D alchemy port with Lars&#8217; ND2D graphics engine. The result involved lots of basketballs <img src='http://www.ghost23.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>Caution: You need the Flash Player incubator build for this to run:</em></p>
<p><strong>[Update]</strong>: As commenters have already pointed out, the app below doesn&#8217;t work with the current flash player anymore. I would have to update Lars&#8217; ND2D engine to make it work again, but i currently simply feel to lazy to do it <img src='http://www.ghost23.de/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
<p><a href="http://ghost23.de/nd2dbox2d_demo/main.html" target="_blank">http://ghost23.de/nd2dbox2d_demo/main.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2011/04/box2d-wck-together-with-nd2d/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CommandCollection gets little bugfixes</title>
		<link>http://www.ghost23.de/2011/02/commandcollection-gets-little-bugfixes/</link>
		<comments>http://www.ghost23.de/2011/02/commandcollection-gets-little-bugfixes/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 12:01:18 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[AS3 / Flex]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=476</guid>
		<description><![CDATA[Juten Tach, a commenter made me aware of a bug in the Process class of my CommandCollection library, thanks for that. During fixing the bug i also fixed a wrong reference assignment for ProcessEvent.currentCommand, so now this should work as expected. CommandCollection is now at v.1.0.1.]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>a commenter made me aware of a bug in the Process class of my <a href="http://code.google.com/p/command-collection/" target="_blank">CommandCollection library</a>, thanks for that. During fixing the bug i also fixed a wrong reference assignment for ProcessEvent.currentCommand, so now this should work as expected.</p>
<p><a href="http://code.google.com/p/command-collection/" target="_blank">CommandCollection</a> is now at v.1.0.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2011/02/commandcollection-gets-little-bugfixes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Events &#8211; still no first-class citizens of ActionScript</title>
		<link>http://www.ghost23.de/2010/10/events-still-no-first-class-citizens-of-actionscript/</link>
		<comments>http://www.ghost23.de/2010/10/events-still-no-first-class-citizens-of-actionscript/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 20:17:49 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Flash in general]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[language]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=367</guid>
		<description><![CDATA[Juten Tach, today i was juggling with Events quite a bit. By the way, isn&#8217;t it odd, that EventDispatcher does not reveal its listeners? At least to its subclasses? Or at the very least have some kind of &#8220;removeAllListeners()&#8221; method (like Robert Penner already noticed)? Anyway, i was thinking: Events in Flash are all over [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>today i was juggling with Events quite a bit. By the way, isn&#8217;t it odd, that EventDispatcher does not reveal its listeners? At least to its subclasses? Or at the very least have some kind of &#8220;removeAllListeners()&#8221; method (like <a href="http://flashblog.robertpenner.com/2009/09/my-critique-of-as3-events-part-2.html" target="_blank">Robert Penner</a> already noticed)?</p>
<p>Anyway, i was thinking: Events in Flash are all over the place nowadays. You use them in DisplayObjects, in your classes and also Flex has them everywhere. The good thing about them is, they could make threads needless. I sometimes see some developers shout for threads in Flash and i want to shout back: &#8220;Are you kidding?&#8221; To whomever Java developer i speak to, they all say, handling threads is a mess. I have no practical experience myself, but i know the basics of threads in Java. Events come to the rescue. They are easy to understand and to handle. It would only take the ability to dispatch an Event, which only fires AFTER the return of the method, that wanted to fire it. This way, we would be able to avoid weird issues like: &#8220;ClassA instantiates ClassB, adds itself as a listener to ClassB, but ClassB already fires an event in its constructor&#8221; (yeah, i know, not the best example, but i hope you get the point). And all the multicore and threading stuff could be managed in the background.</p>
<p>I think, Events should become first-class citizens of the ActionScript language at long last. It would allow for some cool new ways of expressing things. Imagine this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>sample<span style="color: #000066; font-weight: bold;">.</span>CoolEvent<span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> org<span style="color: #000066; font-weight: bold;">.</span>sample<span style="color: #000066; font-weight: bold;">.</span>OtherEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Example dispatches CoolEvent<span style="color: #000066; font-weight: bold;">,</span>OtherEvent <span style="color: #000000;">&#123;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> listener myListener<span style="color: #000066; font-weight: bold;">:</span>EventFromCoolOtherClass<span style="color: #000066; font-weight: bold;">.</span>STARTED<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Example<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
         <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
         someOtherClass = <span style="color: #0033ff; font-weight: bold;">new</span> CoolOtherClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         myListener = someOtherClass <span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span> someHandlerMethod<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
         <span style="color: #009900; font-style: italic;">// blah, doing stuff</span>
&nbsp;
         dispatch async <span style="color: #0033ff; font-weight: bold;">new</span> CoolEvent<span style="color: #000000;">&#40;</span>CoolEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> someHandlerMethod<span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
         myListener = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #009900; font-style: italic;">// ...</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> someOtherFunction<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
         <span style="color: #009900; font-style: italic;">// blah, doing more stuff</span>
&nbsp;
         dispatch <span style="color: #0033ff; font-weight: bold;">new</span> OtherEvent<span style="color: #000000;">&#40;</span>OtherEvent<span style="color: #000066; font-weight: bold;">.</span>STOPPED<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
   <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>These are just some thoughts, that came out of my head within the last hours. For example, it would be nice to be able to define officially, which events a class dispatches. And if you define it in the class header, you have to implement the dispatching, otherwise you&#8217;d get a compile time error (we could need this for errors as well, by the way, but different story). Then the &#8216;listener&#8217; property. It works a bit like a pipe. Yo specify the listener and give it the Event type, you&#8217;re interested in. And in code you wire the dispatcher together with your handler method. Simply unwire by setting the listener to null.</p>
<p>Dispatching an event is almost like today, but you have the async option, which let&#8217;s the init method return, before the event is fired, which releases the stack (only works, if dispatch is the last statement in the method body, of course).</p>
<p>Probably i have forgotten some details, which might make these things not work the way i imagine, but anyway: Events should finally become a part of the ActionScript DNA.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2010/10/events-still-no-first-class-citizens-of-actionscript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash/iphone chapter closed, let&#8217;s move on</title>
		<link>http://www.ghost23.de/2010/04/flashiphone-chapter-closed-lets-move-on/</link>
		<comments>http://www.ghost23.de/2010/04/flashiphone-chapter-closed-lets-move-on/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 08:45:06 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Flash in general]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[androiod]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=300</guid>
		<description><![CDATA[Juten Tach, now, that this flash / iphone thing is closed, Adobe, can you please make sure, that Flash Player 10.1 on Android will be nothing else but mind-blowing? You know, not like &#8220;it works OK&#8221;, but more like &#8220;wtf, is this flash? you&#8217;re kidding. this is flash? Can&#8217;t believe it, this is sooo fast!&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>now, that this <a href="http://www.mikechambers.com/blog/2010/04/20/on-adobe-flash-cs5-and-iphone-applications/" target="_blank">flash / iphone thing is closed</a>, Adobe, can you please make sure, that Flash Player 10.1 on Android will be nothing else but mind-blowing? You know, not like &#8220;it works OK&#8221;, but more like &#8220;wtf, is this flash? you&#8217;re kidding. this is flash? Can&#8217;t believe it, this is sooo fast!&#8221;. It doesn&#8217;t matter matter, if it takes another month, but please get this right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2010/04/flashiphone-chapter-closed-lets-move-on/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>see-conference #5 &#8211; nice (and exhausting)</title>
		<link>http://www.ghost23.de/2010/04/see-conference-5-nice-and-exhausting/</link>
		<comments>http://www.ghost23.de/2010/04/see-conference-5-nice-and-exhausting/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 10:45:53 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[see conference]]></category>
		<category><![CDATA[see#5]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=294</guid>
		<description><![CDATA[Juten Tach, a weekend with a lot of driving lies behind me. The plan was fool-proof, we thought. Take the plane from Hamburg to Frankfurt and go to Wiesbaden by train. Unfortunately, as most of you probably have heard, there were some ash-clouds coming into our way and so on Friday me and David were [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>a weekend with a lot of driving lies behind me. The plan was fool-proof, we thought. Take the plane from Hamburg to Frankfurt and go to Wiesbaden by train. Unfortunately, as most of you probably have heard, there were some ash-clouds coming into our way and so on Friday me and David were hastily driving to Hamburg airport and canceling our tickets and rent a car. From Hamburg to Wiesbaden it is roughly 520 km. So i got up at 5 in the morning, picked up David and drove to Hanover first, were we picked up <a href="http://blog.jensfranke.com/" target="_blank">Jens</a> and <a href="http://blog.ulfgermann.de" target="_blank">Ulf</a> and then headed for Wiesbaden, where we arrived at 9.45, perfectly on time, but a bit tired, naturally.</p>
<p>The weather in Wiesbaden was awesome, no clouds and after a while we recognized, also no condensation trails of course, because there were no planes flying. I remember, after 9/11, when there was no air traffic over the USA, scientists did a study, where they found, that these <a href="http://edition.cnn.com/2002/TECH/science/08/07/contrails.climate/index.html" target="_blank">condensation trails actually have an effect on climate</a>. I wonder, if scientists were doing studies here in Europe over the weekend, too.</p>
<p>Anyway, the conference began and the first speaker was Prof. H. Franke. I have to say, it wasn&#8217;t the best opening talk, the see conference has seen. Prof. Franke is a true scientist and as such elaborated on facts, that most of the people have probably already heard of. It would have been interesting to me, if he had put these facts in context to when they were found or invented, because then we could have seen, that a lot of what we are working on today has been found out decades ago already, but Prof. Franke did not talk about history, he presented the facts, like if they were brand new.</p>
<p>Because of the air traffic problems, some speakers could not make it to the conference, others had to take adventurous trips through Europe to arrive at Wiesbaden. Thus, the program got mixed up a bit, but that&#8217;s understandable, of course.</p>
<p>The two most interesting talks for me were those from Andrew Vande Moere (<a href="http://infosthetics.com/" target="_blank">infosthetics.com</a>) and from Hannes Koch (<a href="http://www.random-international.com/" target="_blank">www.random-international.com</a>).</p>
<p>Andrew talked about the projects he did and does as a lecturer at universities in Australia and Belgium. The point there was, that Andrew suggests, that data visualization is persuasive, as the designer can choose, how he interprets the data and thus where he puts the emphasis on. Later in the evening, i had the chance to have a chat with him at Mexican restaurant down at at the Rhein, which was nice and insightful.</p>
<p>Hannes Koch presented work from his design studio random. At one point he joked about the people, who always want to know, how the pieces are done technically rather then simply enjoying the pieces. I have to admit, i am one of those nerds, too. I would say, it lies in the nature of us human beings, that we want to understand, how things work, and art installations are no exception. So the only difference might be, some people care less, others care more.</p>
<p>Hannes was the last speaker. In the evening, together with <a href="http://www.nulldesign.de/" target="_blank">Lars</a>, <a href="http://www.rwichmann.com/" target="_blank">Raphael</a>, <a href="http://blog.jensfranke.com/" target="_blank">Jens</a>, <a href="http://www.artificialduck.net/" target="_blank">Patrick</a> and a bunch of other guys we were having a good time chatting, having a beer and enjoying the very nice weather.</p>
<p>Then on Sunday we had to drive back all the way to hamburg, so when i arrived there, the rest of the day was mainly sitting on my balcony and doing nothing really but preparing for my upcoming talk at the <a href="http://www.good-school.de/" target="_blank">GoodSchool</a> next Thursday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2010/04/see-conference-5-nice-and-exhausting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New URL structure of this blog</title>
		<link>http://www.ghost23.de/2010/01/new-url-structure-of-this-blog/</link>
		<comments>http://www.ghost23.de/2010/01/new-url-structure-of-this-blog/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 14:50:20 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/?p=263</guid>
		<description><![CDATA[Juten Tach, yesterday i recognized, that my Google pagerank went from 4 to a flat zero. Some analysis suggested, that since my blog was located in a subdirectory called /blog and since my root startpage did not contain any content at all, my blog startpage inherited the pagerank of my blank root startpage. OK, that [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>yesterday i recognized, that my Google pagerank went from 4 to a flat zero. Some analysis suggested, that since my blog was located in a subdirectory called /blog and since my root startpage did not contain any content at all, my blog startpage inherited the pagerank of my blank root startpage. OK, that /blog subfolder was stupid anyway, so i have re-structured my whole blog and now you can reach it directly via ghost23.de instead of the old ghost23.de/blog.</p>
<p>Of course, i didn&#8217;t want to screw up with all the existing incoming links and your bookmarks, so i set up some mod_rewrite rules, that will hopefully cover the old /blog/&#8230; links.</p>
<p>In any case, you might want to update your bookmarks (in case, anyone has any bookmarks to this site <img src='http://www.ghost23.de/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' />  ).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2010/01/new-url-structure-of-this-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Amazon Kindle &#8211; a review</title>
		<link>http://www.ghost23.de/2009/12/my-amazon-kindle-a-review/</link>
		<comments>http://www.ghost23.de/2009/12/my-amazon-kindle-a-review/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 18:49:17 +0000</pubDate>
		<dc:creator>Sven Busse</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.ghost23.de/blog/?p=251</guid>
		<description><![CDATA[Juten Tach, about 2 months ago i bought the international version of the Amazon Kindle 2. Since then, i have used quite a bit and i thought it might be interesting to others, what my overall impression on the device is so far. The device The device feels solid, not really lightweight, but lighter than [...]]]></description>
			<content:encoded><![CDATA[<p>Juten Tach,</p>
<p>about 2 months ago i bought the international version of the Amazon Kindle 2. Since then, i have used quite a bit and i thought it might be interesting to others, what my overall impression on the device is so far.</p>
<p><a href="http://www.ghost23.de/wp-content/uploads/8231_1187572022103_1612403117_30493418_2256540_n.jpg"><img class="alignleft size-medium wp-image-252" title="Amazon Kindle" src="http://www.ghost23.de/wp-content/uploads/8231_1187572022103_1612403117_30493418_2256540_n-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h2>The device</h2>
<p>The device feels solid, not really lightweight, but lighter than an average book. I recognize, that i can easily handle it with ether the right or the left hand. The buttons are where the should be, although it is a bit irritating, that the &#8220;previous page&#8221; button only exists on the left hand side, because it makes me push the home button (which is on the right hand side) by mistake sometimes. I have not used headphones with the device, because i do not listen to music or audio books on it.</p>
<p>The screen works just fine. It takes about one or two seconds for a page to refresh, something other people complain about, but it has never bothered me, because flipping a real page also takes a bit. The &#8220;power&#8221; button is about small, i find it sometimes unnecessarily tedious to slide it.</p>
<h2>The battery</h2>
<p>Not much to say here. It works for weeks. Just make sure, you don&#8217;t have 3G turned on all the time, because you actually only need it, when buying a book or doing updates.</p>
<h2>The display</h2>
<p>I am impressed by the screen every time i look at it. The resolution is very good and the quality of the text is brilliant. Images do always have that feeling of being drawn, even for photos, it is a bit weird, but that is, how i see it. You do have to make sure, that you sit in sufficient lighting, because the device has no back light or something.</p>
<h2>Reading books</h2>
<p>I have not yet bought dozens of books, but i have some very different kinds of books. I have not yet read magazines, because there almost none in German yet. But i have heard, that magazines can be a problem because of layout issues, cannot say anything to that though.</p>
<p>For books, i have read two novels, which just worked great. Even for images, they look very nice, you can also select every image and zoom them to fullscreen. After some minutes, i forget, that i am reading on a digital device, it just feels right. I must say, i use the Kindle mostly en route, like on the train or in the plain. At home, i still mostly read traditional books, because, well, i still have some <img src='http://www.ghost23.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I also bought one book on software development. Actually i have the same book as a traditional book and as a Kindle ebook. There are some problems with the electronic version:</p>
<ul>
<li>Code Examples: The are normally layouted for the fix width of the original book and thus they wrap badly on the device. You can try to fix it by adjusting the font size, but it still is not a good solution</li>
<li>Graphics: Sometimes, in the text you read something like: &#8220;I have put these two images side-by-side, so that you can see the difference&#8221;. Well, that does not work on an ebook, of course, since you can only see one page at a time. Also, books, that make some intense use of layout, will probably not work on an ebook. And something, every author should be aware of anyway, is, that you should not use sentences like: &#8220;As you can see on the image below &#8230;&#8221;. Because on an ebook, you never know, where the image will be.</li>
</ul>
<p>I also have a bit of a problem to know, where i am. With a traditional book, i can go to the table of contents in no time. For the ebooks, i miss a shortcut for doing just that (perhaps i simply haven&#8217;t found it yet ?).<br />
<strong>Update: Thanks for the comment; hitting &#8220;Menu&#8221; and then &#8220;Table of Contents&#8221; does the job <img src='http://www.ghost23.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>Other than that, reading on the Kindle works just fine and i can really recommend it.</p>
<h2>Software</h2>
<p>The Amazon Kindle can only handle its own format, which is a petty. Since a couple of weeks, you can also read PDF files, but i find that rather unusable, because layouts in PDFs are fix, so since the pages are zoomed out to display completely, the font size is normally to small to be read. Unfortunately you cannot even zoom it, although this would be tedious, too.</p>
<p>There are tools for converting epub to the kindle format, though. I have tried them and it seems, as if they work great. One of them is <a href="http://www.lexcycle.com/desktop" target="_blank">Stanza</a>. It is actually for putting ebooks on the iPhone, but i use it for converting any kind of ebook to the Kindle format.</p>
<h2>Wireless</h2>
<p>This is one of the big cool features of the Kindle. The international version has 3G and it works great. Wherever i am, i can switch on 3G and surf through the Kindle Store and read samples or buy books. A very nice user experience. To date unfortunately, there are only English books in the Kindle store, i hope, that changes soon.</p>
<h2>Conclusion</h2>
<p>I am really satisfied with my Kindle. It is slim and light, so it takes almost no space in the bag, so i usually take it with me, when i have my bag with me. I do hope, that there will be German books in the store soon though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghost23.de/2009/12/my-amazon-kindle-a-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

