<?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>if( ExternalInterface.available ){</title>
	<atom:link href="http://blog.sebastian-martens.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sebastian-martens.de</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 21:32:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>User Mouse Tracking / Website Research</title>
		<link>http://blog.sebastian-martens.de/2010/07/user-mouse-tracking-website-research/</link>
		<comments>http://blog.sebastian-martens.de/2010/07/user-mouse-tracking-website-research/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 11:08:24 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Selfnote]]></category>
		<category><![CDATA[Click Test]]></category>
		<category><![CDATA[Mousetracking]]></category>
		<category><![CDATA[useability test]]></category>
		<category><![CDATA[user tests]]></category>
		<category><![CDATA[Usertracking]]></category>
		<category><![CDATA[Website Analytics]]></category>
		<category><![CDATA[website research]]></category>
		<category><![CDATA[websitetest]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=478</guid>
		<description><![CDATA[If you use website statistic tools &#8211; and thats something i guess everybody is interested in &#8211; you got well numbers about how many users visit your website and exactly which page of your website. You will also know from which other website the came and which key words they used within Google to get [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F07%2Fuser-mouse-tracking-website-research%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F07%2Fuser-mouse-tracking-website-research%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.sebastian-martens.de/wp-content/uploads/2010/07/mouse-move-tracker.jpg"><img src="http://blog.sebastian-martens.de/wp-content/uploads/2010/07/mouse-move-tracker-150x150.jpg" alt="" title="mouse-move-tracker" width="150" height="150" class="alignnone size-thumbnail wp-image-479" /></a></p>
<p>If you use website statistic tools &#8211; and thats something i guess everybody is interested in &#8211; you got well numbers about how many users visit your website and exactly which page of your website. You will also know from which other website the came and which key words they used within Google to get to your page. Each of this are very important facts for exmaple for SEO aspects, etc. For example Google Analytics is of course a great free tool for this ( include the old discussion how many more should Google know about you and your website ).<span id="more-478"></span></p>
<p>What i also want to know is where do the users navigate best on my website. What are the best places to put links, so the users will find AND click them ( no &#8211; i don&#8217;t plan to put any adds on my website &#8211; just interested ). Google Analytics has an overlay mode. But this will highlight the existing links. So it will show up which links works best. This comes close, but not perfect.</p>
<p>There are some enterprise tools which do such kind of overlay mode with the users mouse movements. But they are too expensive for me. I guess there will be also some free tools available out there, but programming is also fun :) </p>
<p>So i wrote my little tool which will save the users mouse postion each X milliseconds. If the users leavs the current page, it will make one AJAX request and save all mouse coordinates within one file ( currently not in a database, beacuse writing to filesystem is a bit faster ). When you would like to display the users mouse activity just add <strong>#overlay</strong> at the end of the current URL. It will sum up all saved mouse movements and create a grid overlay over your website. By default the grid elements are 10&#215;10 px large. Each grid field get a color by its relative mouse overs. The more often users moved their mouse over these coords the more red the field will be ( see screenshot for example ).</p>
<p>Of couse this is no perfect solution. But because most users move the mouse the same way they also look over the screen this is a very easy way to track such behaviour.</p>
<h5>How to implement:</h5>
<p>It&#8217;S very easy to use. Just extract the ZIP below onto your webserver and put a little piece of JavaScript into your HTML code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #003366; font-weight: bold;">var</span> mouseMoveTracker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> MouseMoveTracker<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #3366CC;">'rootNodeId'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'contentNode'</span><span style="color: #339933;">,</span>
			<span style="color: #3366CC;">'actionURI'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'../server/'</span><span style="color: #339933;">,</span>
			<span style="color: #3366CC;">'actionURIOverlay'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'../server/result/'</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>The <strong>MouseMoveTracker</strong> class has three major parameters:</p>
<p><em>rootNodeId</em>: The html root node of the tracked section. Because the script id coordinate based it works best with a fixed size layout. Therefor you should enter the Id of the node which has a fixed width and sourrounds all content.</p>
<p><em>actionURI</em>: This is the path to the serverside writing script. To this adress the AJAX requests for writing the user coords will be send.</p>
<p><em>actionURIOverlay</em>: This is the url the script expects to get data from for creating the overlay mode. It will request data via AJAX from this URL after you enter #overlay at the end of the URL and refresh your page.</p>
<p>Feel free to use, modify the code and/or comment here.</p>
<p><a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/07/mouse-move-tracker.zip'>Download mouse-move-tracker.zip (45kB) includes test html file</a></p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/07/user-mouse-tracking-website-research/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamic Resize Flash Application Container / Flash Stage ( without external JavaScript )</title>
		<link>http://blog.sebastian-martens.de/2010/06/resize-flash-application-container/</link>
		<comments>http://blog.sebastian-martens.de/2010/06/resize-flash-application-container/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:29:32 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[resize stage]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=459</guid>
		<description><![CDATA[If you have dynamic content within your Flash application or you have several states or &#8220;pages&#8221; implemented, which all have different content, it might be helpful to resize your flash aplication container within the html- context. For this it&#8217;s not enough to resize the application from within the flash application. You also have to resize [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F06%2Fresize-flash-application-container%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F06%2Fresize-flash-application-container%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you have dynamic content within your Flash application or you have several states or &#8220;pages&#8221; implemented, which all have different content, it might be helpful to resize your flash aplication container within the html- context. For this it&#8217;s not enough to resize the application from within the flash application. You also have to resize the surrounding html container. This is the <em>object</em> tag for Mozilla browsers or the <em>embed</em> tag, if the client uses the Internet Explorer.</p>
<p>In each case you have to use the ExternalInterface. You call it from the flash application with parameters for the new height and width value of the flash container. On the other side you have to define an javascript function which do the resize operation with these values.</p>
<p>Here is an AS3 class which already includes the JavaScript part. Soyou don&#8217;t have to define an extra JS function. So you just have to import the AS3 class into your project and your ready to resize you application from Flash.<span id="more-459"></span></p>
<p>There are three methods to call:</p>
<ul>
<li><b><em>resize</em></b>:This method takes two parameters <em>height</em> and <em>width</em> to completly set the absolute height and width of the flash application.</li>
<li><b><em>addHeight</em></b>: Takes one integer parameter. The value will be added to the current height. So &#8220;50&#8243; for 50px more height or &#8220;-20&#8243; for 20px less in height.</li>
<li><b><em>addWidth</em></b>: Takes one integer parameter. The value will be added to the current width. So &#8220;50&#8243; for 50px more width or &#8220;-20&#8243; for 20px less in width.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * resizes the flash container to needed dimensions 
 * @param height - new needed height 
 * @param width - new needed with
 */</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> resize<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">height</span>:<span style="color: #0066CC;">int</span>, <span style="color: #0066CC;">width</span>:<span style="color: #0066CC;">int</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * adds a specific value (+/-) to current height
 * @param valueHeight
 */</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addHeight<span style="color: #66cc66;">&#40;</span> valueHeight:<span style="color: #0066CC;">int</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * adds a specific value (+/-) to current width
 * @param valueHeight
 */</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addWidth<span style="color: #66cc66;">&#40;</span> valueWidth:<span style="color: #0066CC;">int</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>

<p>To resize your application you could add an resize event handler to check specific containers for resize and do the resizing via this class in the event handler method. If you have fixed sizes per state you could of course also do it the static way.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * @author: Sebastian Martens; sebastian@sebastian-martens.de
 * @copyright: Creative Commons. Free to use &quot;as is&quot;
 * 
 * Test Application
 */</span> 
package<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">nonstatics</span>.<span style="color: #006600;">swfSelfResize</span>.<span style="color: #006600;">swfSelfResize</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span>frameRate=<span style="color: #ff0000;">&quot;31&quot;</span>, <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;100&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;0x008866&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> swfSelfResizeTest <span style="color: #0066CC;">extends</span> Sprite<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> resize:swfSelfResize;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * constructor
		 */</span> 
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> swfSelfResizeTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">resize</span> = <span style="color: #000000; font-weight: bold;">new</span> swfSelfResize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// resize to 500px height, 400px width</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">resize</span>.<span style="color: #006600;">resize</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">500</span>, <span style="color: #cc66cc;">400</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// add 50px height -&gt; 550px height </span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">resize</span>.<span style="color: #006600;">addHeight</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">50</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// remove 10px width -&gt; 390px</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">resize</span>.<span style="color: #006600;">addWidth</span><span style="color: #66cc66;">&#40;</span> -<span style="color: #cc66cc;">10</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/06/com1.zip'>Download com.nonstatics.swfSelfResize.as (12kB)</a><br />
<a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/06/bin-debug.zip'>Download bin-debug (20kB)</a></p>
<p>Be aware of the security model of the flash player! This won&#8217;t work on local filesystem (file://xyz). So please use it on your server (http://www.yourdomain.com) or with your locally installed testserver (http://localhost/whatever).</p>
<p>Hope this helps you.</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/06/resize-flash-application-container/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>EU Tour 2010 &#8211; &#8220;Die letzte Bratwurst vor Amerika&#8221;</title>
		<link>http://blog.sebastian-martens.de/2010/05/die-letzte-bratwurst-vor-amerika/</link>
		<comments>http://blog.sebastian-martens.de/2010/05/die-letzte-bratwurst-vor-amerika/#comments</comments>
		<pubDate>Sat, 22 May 2010 16:47:52 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Bike]]></category>
		<category><![CDATA[Deutschland]]></category>
		<category><![CDATA[motorrad]]></category>
		<category><![CDATA[Portugal]]></category>
		<category><![CDATA[tour]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=411</guid>
		<description><![CDATA[Start frei für Runde Zwei. In diesem Jahr geht es mit den eigenen Maschinen los. Lars und ich werden auf dem europäischen Festland bleiben. Abgesehen davon, dass natürlich der Weg das Ziel ist, geht es nach Portugal. Genauer gesagt zur &#8220;Letzten Bratwurst vor Amerika&#8220;, einem Bratwurststand an der südwestlichen Spitze von Portugal, dem]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fdie-letzte-bratwurst-vor-amerika%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fdie-letzte-bratwurst-vor-amerika%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Start frei für Runde Zwei. In diesem Jahr geht es mit den eigenen Maschinen los. Lars und ich werden auf dem europäischen Festland bleiben.  Abgesehen davon, dass natürlich der Weg das Ziel ist, geht es nach Portugal. Genauer gesagt zur &#8220;<a href="http://www.letztebratwurst.com/" rel="nofollow">Letzten Bratwurst vor Amerika</a>&#8220;, einem Bratwurststand an der südwestlichen Spitze von Portugal, dem <a href="http://maps.google.de/maps?f=q&#038;source=s_q&#038;hl=de&#038;geocode=&#038;q=Cabo+de+S%C3%A3o+Vicente,+86500+Sagres,+Portugal&#038;sll=37.011052,-8.945618&#038;sspn=0.157362,0.363579&#038;ie=UTF8&#038;hq=Cabo+de+S%C3%A3o+Vicente&#038;hnear=Cabo+de+S%C3%A3o+Vicente,+Sagres,+Portugal&#038;ll=37.028869,-8.918152&#038;spn=0.164177,0.363579&#038;z=12&#038;iwloc=A&#038;cid=14328869792898182884 target="_blank">&#8220;Cabo de São Vicente</a>. Wie im <a href="http://blog.sebastian-martens.de/usa2009" target="_blank">letzten Jahr</a> versuche ich eine lücklose Dokumentation der Ereignisse zu schaffen und hier einzustellen.  Wir freuen uns also schon jetzt auf &#8220;Steve&#8221; und mal sehen was in diesem Jahr in Raum 230 so abgeht ( wer das nicht mehr genau versteht sollte evtl. noch mal die Berichte der <a href="http://blog.sebastian-martens.de/usa2009" target="_blank">USA Tour</a> lesen ).</p>
<p>Neue Einträge werden immer unten angehängt, außerdem dieses Jahr mit Slideshow zu den Bildern.</p>
<p><iframe src="/eu2010_map/client/index.html" width="455px" height="455px" frameborder="0"></iframe><br /><span id="more-411"></span><br />
<em>( <b>Für Bilder auf die roten Marker klicken!!</b> An einigen Orten gibt es mehrere Fotos, die ohne zu Zoomen evtl. nicht erkannt werden. Also einfach mal ein wenig auf die einzelnen Punkte vergrößern. )</em></p>
<p><iframe src="/eu2010_map/deploy/" width="455px" height="415px" frameborder="0"></iframe></p>
<p><strong>23. Mai 2010 &#8211; Post aus Portugal!</strong><br />
Wir sind noch nicht einmal losgefahren, da hat man in Portugal bereits Wind von der Tour bekommen. Wolfgang Bald, der Inhaber des besagten Bratwurststandes, hat uns eine e-Mail geschickt und hält eine Bratwurst für uns bereit. Wir freuen uns auf ein Treffen. Schöne Grüße nach Portugal.</p>
<p>cheers,<br />
Sebastian </p>
<p><strong>24. Mai 2010 Tag 1 &#8211; Hmmm Ameisen.</strong></p>
<p>Hallo und Humppa !</p>
<p>Standort: Loh / Deutschland / NRW<br />
Tages KM: 427.00<br />
Gesamtkilometer: 427.00</p>
<p>Wie immer kann man sich auf das Wetter voll und ganz verlassen. Als wir um 10.32 Uhr in Eddelak gestartet waren hatten wir noch ein typisch Dithmarscher Mischwetter. Also wir vorsorglich alles angezogen, was im Schrank zu finden ist. Weiter zur Elbfähre nach Wischhafen. Kaum hat man die Elbe passiert wird das Wetter nicht nur ein bischen besser sondern gleich regelrecht sonnig. Dicke Klamotten schön gedacht aber nun regnete es bei strahlender Sonne und sicher über 20 Grad eher von Innen.</p>
<p>Später gesellte sich zum dem ansonsten fast perfekten Wetter allerdings ein doch recht böhiger Wind. Weil man sich aber hier nicht so recht festen Boden leisten kann, trug der Wind Wesentlichen dazu bei, dass Sand von den Feldern über die Straßen geweht wurde. Regelrechte Sandstürme sorgen dafür das es zumindest bei mir trotz geschlossenen Helms zu Knirschen in den Mundhöhle und tränenden Augen kam.</p>
<p>Wir haben eigentlich keine Tagesziele. Aber die erste Nacht wollten wir eigenltich in Altena verbringen. Dort gibt es nämlich auch eine Burg ( ich glaube das war ja die Burg in der auch Peter Lustig mal eine Folge nach einem Geist gesucht hat &#8211; irgendwas mit Filmtricks oder so ) und in dieser Burg gibt es auch eine Jugendherberge. Dies soll sogar die erste Jugendherberge der Welt gewesen sein. Wie auch immer, wir kommen da an ( Stadt ist wunderschön, tolle kleine verwinkelte Gassen, macht super viel Spaß da mit dem Mopped durchzufahren ) und &#8230; Jugendherberge nicht besetzt. Auch am Telefon meldet sich nur der AB. Tolle Wurst. Na gut. Dann eben weiter zum nächsten Campingplatz. Das alte N95 rausgekramt. Campingplatz suchen. Hinfahren. Gibts nicht mehr! ( Mal abgesehen davon, das Lars Navi mal echt interessanten Routen ausspuckt. Fahrerisch auf jeden Fall reitzvoll. Versuch 2. Das gleiche Drama. Updatehieße das Zauberwort.</p>
<p>Also anhalten und mal fragen wo es hier denn einen Campingplatz gibt. &#8220;Keine Ahnung. Sonst einfach an der Talsperre wild übernachten.&#8221; &#8211; ok. Wenn das das offizielle Aussage eines Einheimischen ist, dann man zu. Hinfahren. Angucken. Alles verboten und auch sehr überlaufen. So toll zum wild Campen ist das auch nicht. Aber die Wanderwegkarte zeigt zumindest einen Campingplatz gleich um die Ecke. Hingefahren. Wunderbar. Hier sind wir jetzt in Loh, NRW. Wir haben außerdem Steve ( Name nach Vergessen von der Redaktion frei erfunden ) kennengelernt. Steve kommt eigentlich aus Tönningen und erkannte daher unsere Kennzeichen. Er lebt aber schon seit 50 Jahren nicht mehr da, sondern hier auf dem Platz. </p>
<p>Zelt aufbauen. Klappt ganz gut. Ab morgen sollten wir die Zeit stoppen. Die Dithmarschenflagge ist angebracht. Nur um die Besitzverhältnisse deutlich zu machen. Werden Sie aber wieder reinholen. Sonst wird das begehrte Stück nur geklaut.</p>
<p>Lars hat sogar einen Gaskocher mit und kocht uns Buchstabensuppe. Sehr lecker. Ich denke ich werde auf der Tour abnehmen. </p>
<p>cheers,<br />
Sebastian</p>
<p><strong>25. Mai 2010 Tag 2 &#8211; Towel Day</strong></p>
<p>Hallo und Humppa nach Deutschland!</p>
<p>Standort: Clefmont / Frankreich<br />
Tages KM: 509.4<br />
Gesamtkilometer: 936.4</p>
<p>SIND IN FEINDESLAND. STOPP. SIND UMZINGELT. STOPP. HABEN UNS AUF EINSAMEN CAMPINGPLATZ IN CLEFMONT AUF DEM LANDE VERSCHANZT. STOPP. WURDEN VON DEN EINHEIMISCHEN HOLLÄNDERN FREUNDLICH AUFGENOMMEN. STOPP.</p>
<p>Nachdem wir dann eben doch noch einen Campingplatz gefunden hatten sind wir doch irgendwie erschöpft zu &#8220;Bett&#8221; gegangen sind &#8211; das muss an der vielen doch eher ungewohnten frischen Luft liegen. </p>
<p>Gegen 02.30 Uhr wurde ich das erste Mal wach. Der Regen klopfte freundlich an die Zeltaußenwand. Erst leise dann mit immer dickeren Tropfen, dass man ja nicht wieder einschläft und wenn dann mit einem richtig schlechten Gewissen, weil man genau weiß, dass man den morgigen Tag im Regen verbringen wird &#8211; tolle Vorstellung. Irgendwann nachts um 04.00 Uhr dann nochmal das gleiche Schauspiel. Wach geworden weil wegen Regen, gefreut das es morgen ein bescheidener Tag wird. Wie immer ist das Glück mit den Dummen. Aufgestanden. Alles trocken. Strahlender Sonnenschein. Los gings. </p>
<p>Bis kurz vor Mittag ( gab nur Frühstück beim Bäcker &#8211; die können sehr leckere Schokocrossaints machen ) hatten wir NRW verlassen und die Innerdeutsche Grenze zur Pfalz überschritten. Nachdem Lars dann noch den Achterbahn-Modus in der Streckenfindung fürs Navi aktiviert hatte, war die Tour nur noch ein Spaß. Rauf. Runter. Links. Rechts. Die Hand kam  nicht mehr zum Stehen vor Schalten. Ganz großes Mopped-Kino. Irgendwie haben die das hier im Süden deutlich besser mit Bergen und kurvigen Bergstraßen drauf.</p>
<p>Kurz nach dem Mittag hatten wir dann auch die äußere Grenze Deutschlands passiert und durchquerten Luxenburg. Weiter so geile Strecken, wenn auch die Straßenverhältnisse nicht mehr unseren Standarts entsprach. Da ist man so schnell durch das Land, warum noch in Straßen investieren. </p>
<p>Kurz nach der zweiten Tankstelle in Luxenburg hörten da dann auch schlagartig die deutschen KFZ- Kennzeichen auf. Zum Tanken kommt man auf jeden Fall gerne wieder. Gleich 40ct weniger pro Liter. 15min später waren wir schon wieder aus dem dem Land draußen.</p>
<p>Wir wollten über Belgien in Frankreich einmarschieren. Belgien sah auch irgendwie gar nicht so viel anders aus. Die Straßen waren noch ein bischen schlechter und irgendwie fühlte man sich bei der Architektur an den ländlichen Osten Deutschlands erinnert. Auf der anderen Seite gab es dann auch wieder sehr süße kleine Dörfer wie Hollywood sie nicht besser hin bekommen hätte. Insgesamt schön mal durchgefahren zu sein. </p>
<p>Und weil wir ja so fleißig sind konnte es gleich mit Staat Nummer vier für den heutigen Tag weitergehen. Einmarsch in Frankreich im frühen Nachmittag. Feind verängstigt. Die Deutschen sind wieder da. </p>
<p>Frankreich ist definitiv Weltmeister im Bauen von Kreisverkehren. Einer nach dem Anderen. Mit dem Mopped allerdings weinger schlimm, da kommt mehr Kurvenstimmung auf :) in dem ansonsten eher gerade verlaufenden Norden Frankreichs. Erinnert ein wenig an die USA. Allgemein hat man doch das ein oder andere Fleckchen scheinbar irgendwie schon mal in den USA gesehen.</p>
<p>Weiter gehts. Verdun links liegen gelassen weiter gen Süden. Die Straßen werden wieder fahrtechnisch attraktiver, wenn auch vom Material her nicht besser. Teilweise schmelzen sie sogar in der Sonne. Wenn man wieder mal den billigen Kram zum Ausbessern genommen hat kann das schon mal vorkommen. </p>
<p>Wir kommen wieder durch sehr viele kleine Dörfer. Irgendwie sind aber alle recht einsam. Man sieht kaum Leute auf der Straße. Vielleicht ist hier ja immer noch Feiertag. Denn bei die Zahl der Kruzifixe und Marienstatuen am Straßenrand kann man es durchaus mit Bayern aufnehmen.</p>
<p>Inzwischen sind wir in Clefmont angekommen. Ein kleiner Ort den man unten von der Starße noch weniger wahrnimmt, als die ganzen anderen kleinen Orte hier in der Gegend. Aber das Campingplatz-Schild ist uns aufgefallen. Am Rande des Dorfes gibt es hier eine große Wiese mit ein paar Bäumen und Bänken plus Wasch/-Verwaltungshaus. Und außer einen paar Holländern mit Wohnwagen ( was denn bitte schön sonst ) keiner da. Im Büro ist leider auch keiner. Wir beschließen aber das Zelt aufzubauen. </p>
<p>Nachdem das Zelt steht kommt ein ( sehr ) kleine Franzose vorbei, der tatsächlich zu dem Platz gehört. Wie bei Franzosen so üblich spricht er nichts außer Französisch. Aber die freundlichen Holländern helfen beim klären der Fragen. Ende gut, alles gut, sind wir mit 6€ für Miete mit freiem Duschen dabei. Der deutsche Platz hatte noch 12€ verlangt, wenn auch mangels Kleingeld nur 10€ bezahlt ( vielen Dank für den netten Nachlaß ).</p>
<p>Jetzt sitze ich hier im Duschhaus auf dem Fußboden im Flur neben der Steckdose und laden nebenbei noch den Akku auf. W-LAN oder sonstiges Internet immer noch fehlanzeige. Aber uns gehts gut ( wenn wir auch keine Nudelsuppe mehr haben und hungrig zu Bett gehen werden um dann morge um do größer zu frühstücken &#8211; Tanke oder so ).</p>
<p>Auch ja: Heute ist Towel Day! Wir sind mit griffbereiten Handtüchern gefahren &#8211; nur mal so zum Sagen! </p>
<p>An dieser Stelle nochmal Danke an die Fahrschule Rüdiger Kape Hamburg, Eimsbüttel für die gute Ausbildung. In einem Dorf rannte auf einmal ein Hund hinter einer Hausecke auf Lars zu. Da hätte nicht mehr viel gefehlt da hätte der Hund den Reifen sogar bekommen. Aber nun stand der Hund direkt auf der Straße vor mir. Dank des ganzen &#8220;Anbremsen und Ausweichen-Trainings&#8221; lebt der Hund aber noch und das Mopped hat keinen Krazer :) </p>
<p>Ab ins Zelt, ein Unwetter kommt auf.</p>
<p>cheers,<br />
Sebastian</p>
<p><strong>26. Mai 2010 Tag 3 &#8211; Französisches Outback</strong></p>
<p>Hallo und Humppa nach Deutschland!</p>
<p>Standort: Flavignac / Frankreich<br />
Tages KM: 557.1<br />
Gesamtkilometer: 1493.5</p>
<p>Zwischenstand: Es regnet. Fahrt unter Wasser, aber es scheint auch so als wenn in der nächsten Stunde noch die Sonne rauskommen würde. Sitzen gerade bei Mc Donalds zum Frühstück. Die sprechen sogar Englisch hier. </p>
<p><strong>Update Tag 3:</strong> So richtig beständig gut ist das Wetter aber nicht. Bei Mc Donalds vom Hof gefahren sah es noch so aus, als würde es besser werden. Wenig später wird man dann eines besseren belehrt. Es regnet. Dann hat man ja im Grunde schon keinen Bock mehr. Aber dann wird es auch wieder besser. Die Straßen trocknen recht schnell und das Fahren macht wieder Spaß. </p>
<p>Inzwischen sieht Frankreich auch so aus wie man sich das vorstellt. Man kommt vorbei an Weinberghängen ( obwohl die Weinpflanzen hier so weit im Norden noch sehr klein sind und nur knapp über den Boden ragen ) vorbei. Die Häuser sehen schon wesentlich mediteraner aus (und nicht mehr so kaputt, dass man sich dan den Osten erinnert fühlt) und man sieht Franzosen mit einem Baguett unter dem Arm und jeder scheint seinen eigenen Wein zu machen, weil an jedemzweiten Haus etwas von Weinverkauf steht ( zumindest glaube ich das bei meinem eingeschänkten Französisch ). Die Gegend ist wirklich wunderschön. Nur zu empfehlen.</p>
<p>Das Navi führt uns weiter an einem Kanal lang auf dem sich sogar Schiffe bewegen und jedes Dorf seinen eigenen kleinen Hafen hat. Da wir aber inzwischen schon in stärker hügeligen Gebiet fahren gibt es spätestens alle 1,5 km ein Schiffshebewerk. Will man dort also von einem Dorf zum nächsten mit dem Schiff fahren ist man sicher einen ganzen Tag beschäftigt weil man immer wieder durch die Hebewerke muss. Wie auch immer &#8211; mit dem Mopped ein Riesenspaß an der kurvigen Straße neben dem Kanal zu fahren. Wenn man hier abschmiert geht halt nur das Mopped baden.</p>
<p>Aber Frankreich ist ja ein Arschloch. Eine Stunde später &#8211; man  hatte gerade die Regenklamotten ausgezogen &#8211; fängt es endgültig an zu regnen und hört auch nicht mehr auf. Das drückt natürlich die Stimmung. Hinzu kommt, dass das Navi unter massiven Umbaumaßnahmen am Straßennetzes leidet. Dann noch ein Baustelle und der Umleitungsversuch des Gerätes ergibt schon eine sehr abenteuerliche Strecke. </p>
<p>Mitten durch das französische Outback oder durch die Hinterhöfe einzelner Häuser &#8211; über Straßen die man eigentlich nur mit Cross-Maschinen befahren dürfte, weil die solange nicht mehr saniert wurden. Abgesehen von einem Teilstück, dass wirklich gerade geflickt wurde indem man einfach nur Tonnen von losem Rollsplit drüber gegeossen hatte. Da sind wir also auch nur mit durchschnittlich 30 km/h vorangekommen. Das waren dann genau die Ecken wo Leute einfach verschwinden und nie wieder auftauchen.</p>
<p>Stunden später lockert es wieder ein wenig auf. Wir folgen dem nächsten Schild in Richtung Campingplatz. Bis wird dann das wieder sehr abgelegene Dörfchen erreicht haben sind wir schon knappe 20km weiter. Direkt an einem See gelegen ( was den Mücken-Anteil ein wenig erhöht ) liegt der Campingplatz. Zelt aufstellen &#8211; irgendwann später wird schon einer kommen zum Kassieren. Nochmal ins Dorf, ein wenig zu Essen besorgen. Schon erstaunlich wie gut man mit nur einem französischen Wort Essen kaufen kann &#8220;Baguett ?!&#8221; &#8211; wir sind nicht verhungert.</p>
<p>Hier hatten wir auch das erste mal Kontakt mit diesen französischen Toiletten ( Löcher im Boden mit Markierungen für die Füße und Griffen an der Wand ). Glücklicherweise waren die Damen-Toiletten dann mit den uns vertrauten Schüsseln ausgestattet. WIr wechselsten also mal eben die Seiten.</p>
<p>Nachts ging der Regen wieder los. Das wird morgen wieder ein toller Tag.</p>
<p>cheers,<br />
Sebastian</p>
<p><strong>27. Mai 2010 Tag 4 &#8211; Schluss mit Lustig</strong></p>
<p>Hallo und Humppa nach Deutschland!</p>
<p>Standort: Oiartzun / Spanien<br />
Tages KM: 491.9<br />
Gesamtkilometer: 1985.4</p>
<p>Auch wenn es noch kurz vor dem Aufstehen geregnet zu scheinen hat, sind wir doch noch halbwegs trocken wieder auf die Strasse gekommen. Heute würden wir es schaffen und endlich Spanien erreichen. Vor uns noch gute 450km bis zur Grenze. Auf dem Weg gab es noch kleine Schauer, aber ansonsten wurde der Tag immer besser und die Straßen immer trockener.</p>
<p>Irgendwie sah es auch schon im spanischer aus. In der einen Stadt schien es sogar eine Stierkampfarena zu geben. Nach einer Weile kamen wir in eine Waldgebiet, das sich später als Nationalpark erwies. Man kam sich gleich wieder wie in den USA vor. Den die nächsten Stunden ging es eigentlich nur gerade aus durch diesen einen großen Wald. Im nachhinein gut, dass wir vorher noch getankt hatten. Denn Häuser oder gar Tankstellen gab es auf der Strecke nicht wirklich mehr viele.</p>
<p>Den Wald durchquert wuchsen endlich wieder mehr Berge und Kurven :) Für die großen Pyrenäen waren wir leider zu weit an der Atlantikküste, das wollten wir uns für die Rücktour aufheben. Aber ein paar kleine Ausläufer waren auch jetzt schon für jede Menge Spaß gut. Ein letzter Halt bevor es dann ab durch die Berge und ab nach Spanien gehen sollte. Die Straße schon kurvig und trocken. Und los gehts&#8230; Aber nicht lange. Nach gut 30min dann technischer Ausfall von Lars Maschine. Wir standen in Bera in Spanien ( auch ein schönes Dorf &#8211; auch wenn die ganze Gegend einen von den Häusern sehr stark an Bayern erinnert ).</p>
<p>Den ADAC angerufen: &#8220;Abschlepper kommt in ca. 1 Stunde.&#8221;. Tat er dann auch. Leider konnte auch der Mann kein Stück englisch. In der Werkstatt zu der Lars gefahren wurde &#8211; ich mit der eigenen Maschine hinterher &#8211; war das nicht anders. Zum Glück hatte &#8211; scheinbar der Werkstattbesitzer ( nennen wir Ihn &#8220;Steve&#8221; ) &#8211; eine deutsche Freundin ( &#8220;Stevanie&#8221; ), die er angerufen hatte um dann das Telefon hin und her zu reichen, damit Sie übersetzen konnte ( später dann am PC mittels Google Translate ).</p>
<p>Das Ende vom Lied: Bis die Teile da wären und das Mopped wieder repariert sein würde, wären wir sicher noch eine Woche dort gefangen gewesen. Der ADAC würde Lars also ausfliegen und ich durfte meine Maschine alleine nach Hause fahren. </p>
<p>Die letzte Bratwurst vor Amerika muss also leider noch ein wenig warten.</p>
<p>Steve hat sich rührend um uns gekümmert. Er hat uns in die nächst größere Stadt gefahren ( Lars, ich wieder mit der eigenen Maschine hinterher ). Dort hatte er bereits ein Hotel gebucht. Wir wollten Ihn dann noch für seine Mühe die letzten 2 Stunden über auf ein Bier einladen, aber er ließ sich auch nicht davon abbringen, dass noch zu bezahlen. </p>
<p>Ein wenig merkwürdig war schon, dass er immer wieder darauf hinwies, dass dieses Hotel sicher sei. Und auch die Dame am Emfang ( Sie konnte Englisch ) wies mehrfach darauf hin, dass überall ums Haus Kameras wären und es sicher wäre das Mopped auf dem Hof abzustellen.</p>
<p>Erst später als Lars im dann gegenüber fallen ließ: &#8220;Also das ist Spanien ?!&#8221;, wies er unmißverständlich darauf hin, &#8220;Pssssst!!! Das ist Baskenland, nicht Spanien. Bloß nicht Spanien erwähnen.&#8221;. Erst dann vielen die Graffities an den Wänden &#8220;ETA&#8221; auf.</p>
<p>Die Nacht haben wir also auf ADAC-Kosten im Hotel verbracht bevor ich am nächsten Morgen die Motorradtour vorzeitig in Richtung Heimat beenden sollte. Lars sollte mit dem Taxi zur Auto Mietstation. Dann mit dem Mietwagen von San Sebastian nach Bilbao, um von dort mit dem Flugzeug via Malle nach Hamburg zu fliege.</p>
<p>cheers,<br />
Sebastian</p>
<p><strong>28. Mai 2010 Tag 5 &#8211; Gib Schub Rakete</strong></p>
<p>Hallo und Humppa!</p>
<p>Standort: Herbholzheim (A5) / Deutschland<br />
Tages KM: Sebastian: 1295.6, Lars: 0<br />
Gesamtkilometer: Sebastian: 3281.0, Lars: 1985.4</p>
<p>Der Urlaub war also vorbei. Alleine Fahren macht auch nicht so viel Spaß. Also &#8220;Gib Schub Rakete.&#8221; ab nach Hause. Bei einer Mischung aus Schnellstraße und mautpflichtiger Autobahn, habe ich die 1.300km von Spanien durch Frankreich hinter die Grenzen Deutschlands in 13,5 Stunden geschafft.</p>
<p>Mehrfach Tanken. Zum Mittag und zum Kaffee gabs jeweils ein Twix, ansonsten durchfahren. ( Leider hab ich erst später von den &#8220;Iron Butt Auszeichnungen&#8221; (<a href="http://www.ironbutt.com/">http://www.ironbutt.com/</a>) fürs Langstrecken Moppedtouren erfahren, sonst hätte ich die letzten 300km für die erste Stufe auch noch gemacht &#8211; so ein Mist.</p>
<p>Ich bin am Volvic- Berg vorbeigekommen. Der sieht gar nicht so aus wie auf der Verpackung.</p>
<p>Im letzten Drittel von Frankreich hielt ich an einer Tankstelle. Während ich meine Kaffee-Mahlzeit einnahm und nochmal auf die Karte guckte für an die gegenüberliegende Seite der Zapfsäule noch ein Biker. Freundlich nickend grüßte ich. Der gute Mann gucke auf mein Nummerschild sagte aber nichts ( einen Franzosen würde ich auch nicht weiter mit Fragen löchern wollen ). Später habe ich dann aber gesehen, dass der auch aus Deutschland kam. Tagelang keinen Deutschen gesehen, der hält direkt neben mir, dann auch noch Biker sagt aber kein Wort. Eingebildeter Harley Fahrer!</p>
<p>Deutsch-Französische Grenze gegen 22.35 Uhr in Mülheim bei Freiburg passiert. Motel 30km weiter genommen. Der Hintern war echt platt. Ich habe auf dem Bauch geschlafen.</p>
<p>cheers,<br />
Sebastian</p>
<p><strong>29. Mai 2010 Tag 6 &#8211; Welcome Home</strong></p>
<p>Hallo und Humppa!</p>
<p>Standort: Eddelak, Dithmarschen / Deutschland<br />
Tages KM: Sebastian: 813,4, Lars: 0<br />
Gesamtkilometer: Sebastian: 4094.0, Lars: 1985.4</p>
<p>Während die französischen Autobahnen ( vermutlich Dank Maut ) wirklich gut gepflegt sind ( wirklich Besenrein und keine Flickstellen ), ähnelt der Aufbau des Straßennetzes eher Supermarktregalen. Möglichst verschachtelt aufstellen, damit der Kunde ja noch an allen Produkten vorbei muss. Spätestens alle 150km änderte sich die Richtung oder man musste eine andere Autobahn nehmen. In Deutschland bin ich auf einer einzigen Autobahn geblieben und kam einmal längs durch das Land. So soll es sein.</p>
<p>Dann mal bis zur nächsten Tour ( hoffentliche länger ). Ich werde heute erst mal zum Imbiss fahren. Irgendwie habe ich Hunger auf Bratwurst.</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/05/die-letzte-bratwurst-vor-amerika/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick start with Flash ExternalInterface class</title>
		<link>http://blog.sebastian-martens.de/2010/05/quick-start-with-flash-externalinterface-class/</link>
		<comments>http://blog.sebastian-martens.de/2010/05/quick-start-with-flash-externalinterface-class/#comments</comments>
		<pubDate>Fri, 21 May 2010 08:52:45 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[flash javascript bridge]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=406</guid>
		<description><![CDATA[The ExternalInterface class allows you to communicate with the Flash wrapping container, which is usually the HTML page with JavaScript capeability. It allows you to send data from ActionsScript to JavaScript and vice versa. The ExternalInterface class is implemented for nearly all current browsers. Please see the documentation for a detailed list of the supported [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fquick-start-with-flash-externalinterface-class%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fquick-start-with-flash-externalinterface-class%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The <a href="http://livedocs.adobe.com/flash/9.0_de/ActionScriptLangRefV3/flash/external/ExternalInterface.html" rel="nofollow">ExternalInterface</a> class allows you to communicate with the Flash wrapping container, which is usually the HTML page with JavaScript capeability. It allows you to send data from ActionsScript to JavaScript and vice versa.</p>
<p>The ExternalInterface class is implemented for nearly all current browsers. Please see the documentation for a detailed list of the supported browsers <a href="http://livedocs.adobe.com/flash/9.0_de/ActionScriptLangRefV3/flash/external/ExternalInterface.html" rel="nofollow">here</a>.</p>
<p>All five attributes and methods are static, so you don&#8217;t need an instance of this class.</p>
<h4>Make sure ExternalInterface is available</h4>
<p>When using the ExternalInterface you should make sure it&#8217;s available. So please test the boolean value <em>ExternalInterface.available</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> ExternalInterface.<span style="color: #006600;">available</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> .... <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><span id="more-406"></span></p>
<h4>Call JavaScript from ActionScript</h4>
<p>To call a JavaScript function from ActionScript you just the the method <em>ExternalInterface.call</em>. First argument must be the function name of the JavaScript method you would like to call. All other parameters will hand over as parameters to the JavaScript method. These parameters should be primitive types like String, Number or even simple Object.</p>
<p>JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> myJSFunction<span style="color: #009900;">&#40;</span> param1<span style="color: #339933;">,</span> param2<span style="color: #339933;">,</span> param3 <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> param1 <span style="color: #339933;">+</span> <span style="color: #3366CC;">': '</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span> parseInt<span style="color: #009900;">&#40;</span>param2<span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> parseInt<span style="color: #009900;">&#40;</span>param3<span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// parseInt is definetly the nicer way</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>ActionScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">function</span> externalInterfaceTest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">void</span><span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> a<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> b<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">:</span>String <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Hello World&quot;</span><span style="color: #339933;">;</span>
&nbsp;
   ExternalInterface.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;myJSFunction&quot;</span><span style="color: #339933;">,</span> c<span style="color: #339933;">,</span> b<span style="color: #339933;">,</span> a <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will show up an alert window with text and calculated numbers.</p>
<p>The <em>call</em> method will also handle return values of the JavaScript method. At least for this you should be aware of the security model of the flash player, otherwise you might get an <em>null</em> value instead the expected result. Therefore please set the flash parameter <em>allowScriptAccess</em> to <em>always</em> and the allowed domain within your flash application.</p>
<p>HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;
   &lt;embed allowScriptAccess=&quot;sameDomain&quot; [...]</pre></div></div>

<p>SWFObject:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> params <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
   params.<span style="color: #660066;">allowscriptaccess</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;always&quot;</span><span style="color: #339933;">;</span>
swfobject.<span style="color: #660066;">embedSWF</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;flvplayer.swf&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;videoPlayer&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;650&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;530&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;9.0.28&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;expressInstall.swf&quot;</span><span style="color: #339933;">,</span> flashvars<span style="color: #339933;">,</span> params<span style="color: #339933;">,</span> attributes<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Flash App:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">Security</span>.<span style="color: #0066CC;">allowDomain</span><span style="color: #66cc66;">&#40;</span> yourDomain <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>If you configured that way you will be able to recieve return values from your JavaScript function and use them in your ActionScript method.</p>
<p>JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> myJSFunction<span style="color: #009900;">&#40;</span> val <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;JavaScripts says: &quot;</span> <span style="color: #339933;">+</span> val<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>ActionScript:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> exInterfaceTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
   <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> ExternalInterface.<span style="color: #006600;">available</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
      <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;myJSFunction&quot;</span>, <span style="color: #ff0000;">&quot;Hello World&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>; 
   <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h4>Call ActionScript method from JavaScript</h4>
<p>Its also possible to start the other way round, that you call an ActionScript method from an JavaScript function. Therefor you have to register an callback function within your AS code. You will connect any method name with an existing method.</p>
<p>This is done with the <em>addCallback</em> method. First argument is any function name you like. This will be the function you could call within JavaScript. The second argument is an function reference or closure which should be handle the call. All arguments will be passed to this method.</p>
<p>The JavaScript side function is an object of the flash wrapping container ( Object-Element / Embed-Element ) which should be referenced by it&#8217;s id/name. Also for this direction arguments and return values are possible.</p>
<p>HTML/JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> <span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>
     <span style="color: #003366; font-weight: bold;">var</span> init <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
     <span style="color: #003366; font-weight: bold;">var</span> flashObjId <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;myExInterfaceTest&quot;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #006600; font-style: italic;">// flash is initialised and AS methods could be called</span>
     <span style="color: #003366; font-weight: bold;">function</span> flashReady<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         init <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
         callAsMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
&nbsp;
     <span style="color: #003366; font-weight: bold;">function</span> callAsMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #003366; font-weight: bold;">var</span> objRef<span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> window<span style="color: #009900;">&#91;</span> flashObjId <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
             <span style="color: #006600; font-style: italic;">// none microsoft</span>
             objRef <span style="color: #339933;">=</span> window<span style="color: #009900;">&#91;</span>flashObjId<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
             objRef <span style="color: #339933;">=</span> document<span style="color: #009900;">&#91;</span>flashObjId<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
&nbsp;
         <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> objRef.<span style="color: #660066;">jsCallHandler</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;myArguments&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
 <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
 <span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
 <span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
     <span style="color: #339933;">&lt;</span>object classid<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;</span>
             id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myExInterfaceTest&quot;</span> width<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;100&quot;</span> height<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;100&quot;</span>
             codebase<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab&quot;</span><span style="color: #339933;">&gt;</span>
         <span style="color: #339933;">&lt;</span>param <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;movie&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;test.swf&quot;</span> <span style="color: #339933;">/&gt;</span>
         <span style="color: #339933;">&lt;</span>param <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;allowScriptAccess&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;sameDomain&quot;</span> <span style="color: #339933;">/&gt;</span>
         <span style="color: #339933;">&lt;</span>embed src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;test.swf&quot;</span> quality<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;high&quot;</span>
             width<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;100&quot;</span> height<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;100&quot;</span> <span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myExInterfaceTest&quot;</span> align<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;middle&quot;</span>
             allowScriptAccess<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;sameDomain&quot;</span> pluginspage<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.macromedia.com/go/getflashplayer_de&quot;</span><span style="color: #339933;">&gt;</span>
         <span style="color: #339933;">&lt;/</span>embed<span style="color: #339933;">&gt;</span>
     <span style="color: #339933;">&lt;/</span>object<span style="color: #339933;">&gt;</span>
&nbsp;
 <span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span></pre></div></div>

<p>ActionScript part:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// This method is called when initialisation is finished and application is ready</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
   <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> ExternalInterface.<span style="color: #006600;">available</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
       ExternalInterface.<span style="color: #006600;">addCallback</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;jsCallHandler&quot;</span>, javaScriptHandlerMethod <span style="color: #66cc66;">&#41;</span>;
       ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;flashReady&quot;</span> <span style="color: #66cc66;">&#41;</span>;
   <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span> 
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> javaScriptHandlerMethod<span style="color: #66cc66;">&#40;</span> arg <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;ActionScript says:&quot;</span> + arg <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>For a large number of JavaScript calls from ActionScript to JavaScript i regular use the <a href="/jscallstack">jsCallStack</a> class which implements an stack of javascript calls to handle this timed and avoid doubled calls. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/05/quick-start-with-flash-externalinterface-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preload assets with JavaScript, load-complete callback for single assets include SWF/Flash</title>
		<link>http://blog.sebastian-martens.de/2010/05/preload-assets-with-javascript-load-complete-callback-for-single-assets-include-swfflash/</link>
		<comments>http://blog.sebastian-martens.de/2010/05/preload-assets-with-javascript-load-complete-callback-for-single-assets-include-swfflash/#comments</comments>
		<pubDate>Sat, 15 May 2010 13:02:42 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash callback]]></category>
		<category><![CDATA[flash loaded event]]></category>
		<category><![CDATA[Preloader]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=383</guid>
		<description><![CDATA[Currently i need to know within JavaScript when a SWF-file was loaded completly. You could easily handle this with a single ExternalInterface call from within the Flash-application. This is not a very nice solution if this has to be done for each of you flash-applications. This is the neccesary way if you also have to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fpreload-assets-with-javascript-load-complete-callback-for-single-assets-include-swfflash%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F05%2Fpreload-assets-with-javascript-load-complete-callback-for-single-assets-include-swfflash%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Currently i need to know within JavaScript when a SWF-file was loaded completly. You could easily handle this with a single ExternalInterface call from within the Flash-application. This is not a very nice solution if this has to be done for each of you flash-applications. This is the neccesary way if you also have to access the flash-application from outside. But in my case i just need to know when the flash is loaded and available in the browser cache. </p>
<p>For this i wrote the <em>swfJSPreLoader</em>. This preloader accepts an array of assets you would like to preload. Internally it will create an flash-application which does the preloading. You could define several callback handlers. So JavaScript gets to know when all assets are loaded or each single asset is loaded including SWF-files.<span id="more-383"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #003366; font-weight: bold;">var</span> swfJSPreLoaderConfig <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #3366CC;">'_swfPath'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'./'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// configure path to preloader SWF file</span>
&nbsp;
		<span style="color: #3366CC;">'assets'</span><span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span>	<span style="color: #3366CC;">'assets/teaser.swf'</span><span style="color: #339933;">,</span>
				 	<span style="color: #3366CC;">'assets/img2.jpg'</span><span style="color: #339933;">,</span>
				 	<span style="color: #3366CC;">'--error--'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
		<span style="color: #3366CC;">'assetLoaded'</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> asset<span style="color: #339933;">,</span> bytes<span style="color: #339933;">,</span> <span style="color: #000066;">status</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> asset <span style="color: #339933;">+</span> <span style="color: #3366CC;">' loaded ('</span> <span style="color: #339933;">+</span> bytes <span style="color: #339933;">+</span> <span style="color: #3366CC;">')'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
		<span style="color: #3366CC;">'loadComplete'</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
			<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'all assets loaded. totally loaded bytes: '</span> <span style="color: #339933;">+</span> swfJSPreLoader.<span style="color: #660066;">loadedBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
		<span style="color: #3366CC;">'loadError'</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
			<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'load error'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
		<span style="color: #3366CC;">'callback'</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			swfJSPreLoader.<span style="color: #660066;">addAsset</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/teaser2.swf'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> <span style="color: #000066;">status</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
															<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'teaser2 loaded status:'</span> <span style="color: #339933;">+</span> <span style="color: #000066;">status</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
														<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&nbsp;
&lt;script type=&quot;text/javascript&quot; src=&quot;swfobject.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;swfJSPreLoader.js&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>To use the swfJSPreLoader you have to include three js files for swfObjects, JQuery and the swfJSPreLoader.js. You also have to define an JS variable <em>swfJSPreLoaderConfig</em> to configure the preloader. The config-variable could hold the following items:</p>
<ul>
<li><strong><em>assets</em></strong>: assets is an array of the assets which should be loaded. The asset-paths must be relative the html page. If you insert wrong asset pathes you could define an error handler. The assets array is optional. You could also add assets via method call.</li>
<li><strong><em>assetLoaded</em></strong>: assetLoaded defines the callback method for each loaded asset. So this method will be called each time an asset is loaded completly. There are three parameters. <em>asset</em> &#8211; gives the asset-path; <em>bytes</em> &#8211; gives the number of loaded bytes of the current asset; <em>status</em> &#8211; gives the loading status ( 200: Ok, 404: Loading error )</li>
<li><strong><em>loadComplete</em></strong>:The loadComplete callback method will be called after the queue of assets to load is empty. Not all assets need be loaded successfully. If not the error-callback will be fired.</li>
<li><strong><em>loadError</em></strong>:The loadError callback will be triggered if the current asset could not be loaded correctly.</li>
<li><strong><em>callback</em></strong>:With callback you could register a method which is called after the initialization of the swfJSPreLoader. After this method is called you could use the public methods of the pre loader.</li>
</ul>
<p>There are two public methods of the swfJSPreLoader. Both methods are ready after the callback method is called and the initialisation is ready ( the loader flash is instanziated ).</p>
<p><strong><em>swfJSPreLoader.addAsset</em></strong>: The <em>addAsset</em> method allows you to add a single asset to add to the loading queue. It takes to parameters. The first is the path to the asset, the second is the callback handler, which will be fired after this specific asset was loaded. The callback will also be called if the loading fails. The callback gets one argument <em>status</em> with the loading status ( 200: Ok, 404: Loading error ).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/**
 * @public 
 * 
 * adds asset to loading queue
 * @param {String} assetPath - path to assets to load
 * @param {Function} callback - optional callback handler when loading is complete
 */</span>
addAsset<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> assetPath<span style="color: #339933;">,</span> callback <span style="color: #009900;">&#41;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">swfJSPreLoader.<span style="color: #660066;">addAsset</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/teaser2.swf'</span><span style="color: #339933;">,</span>
						<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> <span style="color: #000066;">status</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
							<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'teaser2 loaded status:'</span> <span style="color: #339933;">+</span> <span style="color: #000066;">status</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
						<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong><em>swfJSPreLoader.loadedBytes</em></strong>: The <em>loadedBytes</em> method returns the number of total loaded bytes.</p>
<p>Update 2009-05-17:<a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/05/swfJSPreLoader.zip'>swfJSPreLoader Flash Builder Project Sourcefiles (ZIP, 553kb)</a></p>
<p>Update 2009-05-17:<a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/05/swfJSPreLoader-Test1.zip'>swfJSPreLoader-Test (ZIP, 532kb)</a></p>
<p>I hope this is helpfull for anybody.</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/05/preload-assets-with-javascript-load-complete-callback-for-single-assets-include-swfflash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FFK10 &#8211; Day 2</title>
		<link>http://blog.sebastian-martens.de/2010/04/ffk10-day-2/</link>
		<comments>http://blog.sebastian-martens.de/2010/04/ffk10-day-2/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 20:41:53 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=378</guid>
		<description><![CDATA[Hallo und Humppa nach Norddeutschland, Nach einem gelungenen Beisammensein bei der Audiotool-Party, konnte es mit dem zweiten Tag der Konferenz losgehen. Usabillity Testing Das erste mal auf der FFK vertreten führte Tobias Hauser den Zuhörer in die Welt des struktierten User Tests ein. Was machen wenn der User meint die Webseite sie nicht nutzbar oder [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F04%2Fffk10-day-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F04%2Fffk10-day-2%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Hallo und Humppa nach Norddeutschland,</p>
<p>Nach einem gelungenen Beisammensein bei der Audiotool-Party, konnte es mit dem zweiten Tag der Konferenz losgehen.</p>
<h3>Usabillity Testing</h3>
<p>Das erste mal auf der FFK vertreten führte Tobias Hauser den Zuhörer in die Welt des struktierten User Tests ein. Was machen wenn der User meint die Webseite sie nicht nutzbar oder Webanwendung ist nicht zu friedenstellend ? Wie geht mein beim Testen vor, welche Software unterstützt, worauf sollte man achten und was sollte man beim Testing lieber unterlässt.<br />
<span id="more-378"></span></p>
<h3>Wer langsam ist wird verlassen &#8211; Web-Performance tuning</h3>
<p>Wenn auch nicht gerade in Zusammenhang mit Flash im Speziellen, so ist das Thema Web-Performance tuning doch sehr wichtig für den User und künftig auch ein wichtiges Kriterium für die Bewertung durch Suchmaschinen. Johannes Mainusch, technischer Direktor bei XING, gewährt Einblicke in die Performance Tuning Maßnahmen und Architektur bei XING. Vieles findet sich auch im <a href="http://devblog.xing.com/">XING Dev-Blog</a>.</p>
<h3>Set your Code on Fire</h3>
<p>Wie beschleunige ich meinen Entwicklungsworkflow &#8211; nicht nur während des Schreibens des Codes sondern auch innerhalb des Projektes in meinem Team ? Darüber wollte Michael Plank bei der Präsentation von FDT und Beispielen aus dem Powerflasher-Alltag informieren. Man hätte gehofft, dass es evtl bereits einen kleinen Einblick in die nächste FDT Version gibt, aber es blieb bei  FDT 3. Nach einen kleinen Programmfehler entwickelte sich der Vortrag auch ein klein wenig zum Sammeln von Bugs aus dem Publikum und für den Part des Teamworkflows blieb nicht mehr zu viel Zeit, sodass es bei vielen vielen Stichwörtern blieb.</p>
<h3>Flash Games Invade the 3rd Dimension!</h3>
<p>Die Vorträge von Seb Lee-Delile sind immer wieder ein Erlebnis auf ganzer Linie. Witzig und mit großartigen Bilder zeigt er Beispiele seiner letzten Projekte und was sich alles mit Flash in 3D machen lässt und wie man in Verbindung mit Motion Detection auch das Publikum dazu bekommt mit grünen Leuchtstäben zu fuchteln und zu schreien.</p>
<h3>Der Apparat</h3>
<p>&#8230; ist eine Sammlung von Optimierungswerkzeugen für Flash Anwendungen von Joa Ebert, die im Wesentlichen die Unzulänglichkeiten des originären Flash Compiler ausbügeln sollen.  Diese beinhalten nicht nur einen Decompiler für SWF-Files sondern auch Optimierungstools für eine anschließendes erneutes comilpieren. So lassen sich z.B. eingebettete Bilddateien in der Größe reduzieren. In einem anderen Beispiel wurde die Performance der Anwendung durch nachträgliches Optimieren des Bytecodes verbessern.</p>
<h3>Willkommen bei der Sideshow</h3>
<p>In dem letzten Vortrag der Konferenz entführt uns Mario Klingemann in seine Welt voller Flashgenerierter Kunstwerke. Nicht zu beschreiben, muss man eben sehen.</p>
<p>Wir freuen uns also schon alle auf das nächste Jahr ! </p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/04/ffk10-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFK10 &#8211; Day 1</title>
		<link>http://blog.sebastian-martens.de/2010/04/ffk10-day-1/</link>
		<comments>http://blog.sebastian-martens.de/2010/04/ffk10-day-1/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 19:23:53 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=369</guid>
		<description><![CDATA[Hallo und Humppa nach Norddeutschland, wie immer: wer nicht gerade in Köln bei der Flash Forum Konferenz (FFK10 &#8211; http://ffk10.flashforum.de) ist der verpasst etwas. Dieses Jahr geht das Treffen der größten deutschen Community zum Thema Flash und Flash Plattform in die bereits 10 Runde. Wieder einmal konnte die Konferenz mehr Teilnehmer als im Vorjahr anlocken. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F04%2Fffk10-day-1%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F04%2Fffk10-day-1%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Hallo und Humppa nach Norddeutschland,</p>
<p>wie immer: wer nicht gerade in Köln bei der Flash Forum Konferenz (FFK10 &#8211; <a href="http://ffk10.flashforum.de/">http://ffk10.flashforum.de</a>) ist der verpasst etwas. Dieses Jahr geht das Treffen der größten deutschen Community zum Thema Flash und Flash Plattform in die bereits 10 Runde. Wieder einmal konnte die Konferenz mehr Teilnehmer als im Vorjahr anlocken. In diesem Jahr sind es Runde 500.</p>
<h3>Keynote</h3>
<p>Wie schon im letzten Jahr kam die Keynot von <a href="http://www.webkitchen.be/">Serge Jespers</a>, seines Zeichens Evangelist bei Adobe. Es gab wieder eine kleine Übersicht über die Flash Plattform und eine paar Demos zu den Neuerungen im Flash Player, die sich besonders im Mobile-Bereich zeigen. Serge zeigte auch ein Nexus One mit Flash Player. Den Vergleich zwischen HTML5 und Flash gewann natürlich der Flash Player ;) Nicht Teil der Demo ist natürlich das iPhone &#8211; aus aktuellem Anlass eine entsprechend häufiger belächeltes Thema allerortens.<br />
<span id="more-369"></span><br />
Nach der Übersicht gab es noch eine kleine Demo zur neuen Creative Suite 5 von <a href="http://aflexworld.com/">Alex Ciorapciu</a>.<br />
In CS5 wird die Integration der Adobe und vormals Macromedia Produkten maßgebliche vorangetrieben. Der Datenaustausch zwischen der Software wird immer besser und beeindruckender, was z.B. das öffnen von InDesign in Flash angeht.<br />
Besonders beeindruckend war natürlich die Bildretusche in Photoshop. For zwei Versionen musste man noch aufwendig von Hand mehrere Bilder zusammenpinseln. In CS4 gab es schon ein &#8220;Content aware scaling&#8221; und man konnte mehrere Bilder zusammenführen um die Schnittmenge zu bekommen ( was z.B. Autos oder Fahrradfahrer, die nur in einem Bild auftauchen eleminiert ). Mit CS5 ist dafür nur noch ein langweiliger Pinsel notwendig der irgendwie aus nur einem Bild alles wegretuschiert was nicht gewünscht wird. Keine Ahnung wo der das Haus hinter dem Fahrradfahrer her holt ?! </p>
<h3>Flash Augmented Reality Workflow</h3>
<p><a href="http://www.jessefreeman.com/">Jesse Freemann</a> zeigt uns seinen Workflow um Augmented Reality im Flash Player wahr werden zu lassen. Dazu muss natürlich erst nochmal gezeigt werden, was Augemented Reality überhaupt ist und was man damit machen kann. So richtig technisch wurde es nicht, aber für einen Überblick hat es gereicht und Spaß gemacht hat es auch noch. Also Objekte in Papervision erstellen und dann das <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">Flar Toolkit</a> benutzen. Fertig!</p>
<h3>iPhone-Entwicklung mit Flash CS5</h3>
<p>Der Vortrag von <a href="http://www.netTrek.de/">Saban Ünlü</a> hatte natürlich eine unerwartete Brisanz bekommen durch die neueren Ereignisse, rund um das &#8220;Flash Verbot&#8221; auf dem iPhone und den Export einer Flash App als iPhone App. Dieser Vortrag schafft Klarheit über den langen Weg einer Anwendung auf das iPhone. Der Teil der dann noch in Flash CS5 eingetragen werden braucht ist erschreckend klein. </p>
<h3>Presentation Patterns</h3>
<p>&#8230; musste leider ausfallen, weil <a href="http://florian.salihovic.info/blog">Florian Salihovic</a> sich mit chinesischem Essen angelegt und verloren hatte. Gute Besserung! Es soll zu spontanen Vorträgen gekommen sein &#8230;</p>
<h3>Intelligente online Videos auf Basis der Flash Plattform</h3>
<p><a href="http://www.svenbrencher.de/">Sven Brencher</a> zeigt, dass es auch im Videobereich ordentlich vorangeht, was die Adobe Palette angeht. Natürlich sieht das immer ganz leicht aus wenn die das da vorne machen, aber es ist auch sehr beeindruckend zu sehen wie mit einem Storyboard der gesprochende Text erkannt wird letztendlich recht unkompliziert eine Videoanwendung entsteht, die weiß, welcher Text gerade gesprochen von welchem Sprecher gesprochen wird. </p>
<h3>Tanzen mit Krüken</h3>
<p>&#8220;Es gibt definitv dankbarere Plattformen als Flash, wenn es um dynamische Sound Generierung geht. Die spartanische Sound API von Flash ist bei der Klangerzeugung so nützlich wie einem Tänzer zwei Krüken beim Tango.&#8221; &#8211; so viel zur Erklärung des Titels. Das es trotzdem geht beweist <a href="http://blog.andre-michelle.com/">André Michelle</a> natürlich spätestens seit dem <a href="http://www.audiotool.com/">Audiotool</a> ( das jetzt endlich seine eigene Plattform hat, also fleißig ausprobieren und Tracks erstellen ). Natürliche wurde die Tonematrix rausgeholt und natürlich musste man ein Blick in das Audiotool werfen, aber es gab auch neues an der Audio-Kunst-Front. So hatte das wie immer begeisterte Publikum viel Spaß an der froh animierten Kombination aus Tönen und Physikengine &#8211; hüpfende Kugeln &#8211; toll.</p>
<h3>DIY Methodology, or, When Being Agile Can Break Your Back</h3>
<p><a href="http://blog.snogboggin.com">Chris Pelsor</a>erzählt wie er Projekte angeht und welche Methoden für Ihn funktionieren und welche nicht. War auf jeden Fall sehr zu empfehlen. Sonst bitte unbedingt nochmal &#8220;<a href="http://gettingreal.37signals.com/">Getting Real</a>&#8221; lesen. Man findet viel wieder.</p>
<h3>UnitZeroOne: Skunkworks</h3>
<p>Spaß! <a href="http://www.unitzeroone.com/blog/">Ralph Hauwert</a> zeigt, dass sich 3D Objekte auch in Echtzeit wirklich flüssig animieren lassen, was wirklich wörtlich gemeint ist. <a href="http://www.unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/">Demo gibts hier</a>. Oder wie man einen Raytracer in Flash baut. Impressiv &#8211; as usual !</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/04/ffk10-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Timer Class</title>
		<link>http://blog.sebastian-martens.de/2010/02/javascript-timer-class/</link>
		<comments>http://blog.sebastian-martens.de/2010/02/javascript-timer-class/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 21:22:14 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=363</guid>
		<description><![CDATA[Here is a little JavaScript Class which allows you to have timed function calls. Of course there could be different instances of these timers. Here is a example how to use it: var timer = new Timer&#40; &#123;'interval':1000&#125; &#41;; timer.start&#40; timedFunction &#41;; &#160; function timedFunction&#40;&#41;&#123; // called every 1000 milliseconds &#125; The function timedFunction will [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F02%2Fjavascript-timer-class%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F02%2Fjavascript-timer-class%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Here is a little JavaScript Class which allows you to have timed function calls. Of course there could be different instances of these timers. Here is a example how to use it:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Timer<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'interval'</span><span style="color: #339933;">:</span><span style="color: #CC0000;">1000</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span> timedFunction <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> timedFunction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <span style="color: #006600; font-style: italic;">// called every 1000 milliseconds</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The function <em>timedFunction</em> will be called every 1000 milliseconds. The millisecond interval will be configured within the configuration object, which is given as parameter into the the class constructor. There is also an optional second parameter for the <em>start</em> function to set the scope. This allows you to use the timer within other JavaScript objects. To stop the timer use the <em>stop</em> function.<br />
<span id="more-363"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/** ------------------------------------------------------------------------------------------------------------ *
 * @class: Timer
 * @classDescription: implements a timer class to handle timed events
 * @author: Sebastian Martens
 ** ------------------------------------------------------------------------------------------------------------ */</span>
<span style="color: #003366; font-weight: bold;">function</span> Timer<span style="color: #009900;">&#40;</span> obj <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">isRunning</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// is timer currently running</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">interval</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// default interval of event calls</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">funcRef</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// reference to called function</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">scope</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span> 
&nbsp;
	<span style="color: #000066; font-weight: bold;">this</span>._timerId <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// global timer id</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * @constructor
	 * @param {Object} obj - construction parameter
	 */</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">construct</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> obj <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mixIn</span><span style="color: #009900;">&#40;</span> obj<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #006600; font-style: italic;">// find smallest not used timer id</span>
		<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span> document<span style="color: #009900;">&#91;</span> <span style="color: #3366CC;">'myTimer'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>._timerId <span style="color: #009900;">&#93;</span><span style="color: #339933;">!=</span><span style="color: #003366; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">this</span>._timerId<span style="color: #339933;">++;</span>
		document<span style="color: #009900;">&#91;</span> <span style="color: #3366CC;">'myTimer'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>._timerId <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * mix a given object into this object
	 * @param {Object} obj - given object with parameters
	 */</span>	
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mixIn</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> obj<span style="color: #339933;">,</span> scope <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>scope<span style="color: #009900;">&#41;</span> scope <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span> <span style="color: #000066; font-weight: bold;">in</span> obj<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			scope<span style="color: #009900;">&#91;</span> <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> obj<span style="color: #009900;">&#91;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * starts timer
	 * @param {Int} interval - time in milliseconds for time interval
	 * @param {Node} scope - the execution scope of the reference function
	 * @param {Function} funcRef - function reference of function to be called on time event
	 */</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">start</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> funcRef<span style="color: #339933;">,</span> scope<span style="color: #339933;">,</span> interval <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>interval<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">interval</span> <span style="color: #339933;">=</span> interval<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">scope</span> <span style="color: #339933;">=</span> scope<span style="color: #339933;">;</span>		
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">funcRef</span> <span style="color: #339933;">=</span> funcRef<span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">isRunning</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">startTimer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * starts a new time event call with given time interval
	 */</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">startTimer</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">isRunning</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span> 
		window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;document['myTimer&quot;</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>._timerId<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'].timedHandler()&quot;</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">interval</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * stopps the timer
	 */</span>	
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">stopp</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">isRunning</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">/**
	 * timed event handler. will be called on each time event
	 */</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timedHandler</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">isRunning</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">funcRef</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">funcRef</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">scope</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">stopp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// do next timer call</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">startTimer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// constructor call</span>
	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">construct</span><span style="color: #009900;">&#40;</span> obj <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Download JavaScript <a href='http://blog.sebastian-martens.de/wp-content/uploads/2010/02/Timer.js'>Timer.js</a></p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/02/javascript-timer-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect OpenOffice with MAMP/XAMPP MySQL on OS X</title>
		<link>http://blog.sebastian-martens.de/2010/01/connect-openoffice-with-mampxampp-mysql-on-os-x/</link>
		<comments>http://blog.sebastian-martens.de/2010/01/connect-openoffice-with-mampxampp-mysql-on-os-x/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 23:30:08 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Selfnote]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[OpenOffice]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=351</guid>
		<description><![CDATA[Just to have a note for myself, here are some steps you need to know to connect your MySQL Database with OpenOffice e.g. for creating form letters. You need to create a ODBC connection. First step is to install the latest ODBC drivers. For MySQL you will get them diretly from MySQL: http://dev.mysql.com/downloads/connector/odbc/. Just download [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F01%2Fconnect-openoffice-with-mampxampp-mysql-on-os-x%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F01%2Fconnect-openoffice-with-mampxampp-mysql-on-os-x%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Just to have a note for myself, here are some steps you need to know to connect your MySQL Database with OpenOffice e.g. for creating form letters.</p>
<p>You need to create a ODBC connection. First step is to install the latest ODBC drivers. For MySQL you will get them diretly from MySQL: <a href="http://dev.mysql.com/downloads/connector/odbc/">http://dev.mysql.com/downloads/connector/odbc/</a>. Just download and click through the installer. If you used the XAMPP or MAMP packages the MySQL socket will not be installed in the <em>/tmp</em> directory. But this is required for most ODBC drivers.<span id="more-351"></span></p>
<p>Please check your <i>/tmp</i> directory first. If there is not mysql.sock the aasiest way is to create a link between them. So switch to Terminal and create the link:</p>
<p><code>sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock</code></p>
<p>Otherwise you will get an error like &#8221; <em>Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; (2) </em>&#8220;.</p>
<p>Last thing to do for a ODBC connection is to configure your new connection. Therefor you could use the <a href="http://support.apple.com/downloads/ODBC_Administrator_Tool_for_Mac_OS_X">ODBC Administrator</a> from Apple. Also just download and click through the installer. You will get the new application in your System > Utilitys folder. </p>
<p>Under <em>System DNS</em> you should already find your MySQL connector. Mark the entry and configure it. It&#8217;s very important to enter the username and the MySQL table.</p>
<p>Now you could create a new database file with OpenOffice ( you should share it through OpenOffice to have easy access from other OO applications ). Just choose &#8220;Create connection to existing Database&#8221; and select MySQL via ODBC.</p>
<p>In some cases you might get problems with the standard ODBC connection. In this case there is a special MySQL-plugin for OpenOffice, which allows you diretly to connect to the database. You could download this <a href="http://extensions.services.openoffice.org/project/mysql_connector">MySQL connection plugin here</a>. There is also a small <a href="http://wiki.services.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0">How To direct from OpenOffice</a>.</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/01/connect-openoffice-with-mampxampp-mysql-on-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Medion Navigationsgerät (GoPal auf WinCE) mit eigenen Geokoordinaten / POIs erweitern</title>
		<link>http://blog.sebastian-martens.de/2010/01/medion-navigationsgerat-gopal-auf-wince-mit-eigenen-geokoordinaten-pois-erweitern/</link>
		<comments>http://blog.sebastian-martens.de/2010/01/medion-navigationsgerat-gopal-auf-wince-mit-eigenen-geokoordinaten-pois-erweitern/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 12:38:28 +0000</pubDate>
		<dc:creator>Sebastian.Martens</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://blog.sebastian-martens.de/?p=336</guid>
		<description><![CDATA[Für die Freiwillige Feuerwehr haben wir uns ein Navigationsgerät angeschafft und dies wollte ich nun schon seit langer langer Zeit mit den Geokoordinaten der Hydranten bestücken, damit man im Einsatzfall auch die selten verwendeten Hydranten schnell findet. Künftig sollen hier auch die Koordinaten der Hydranten aus den Nachbargemeinen eingespielt werden. Wird diese bei einem Einsatz [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F01%2Fmedion-navigationsgerat-gopal-auf-wince-mit-eigenen-geokoordinaten-pois-erweitern%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sebastian-martens.de%2F2010%2F01%2Fmedion-navigationsgerat-gopal-auf-wince-mit-eigenen-geokoordinaten-pois-erweitern%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Für die <a href="http://www.ff-eddelak.de">Freiwillige Feuerwehr</a> haben wir uns ein Navigationsgerät angeschafft und dies wollte ich nun schon seit langer langer Zeit mit den <a href="http://www.ff-eddelak.de/hydranten.php">Geokoordinaten der Hydranten</a> bestücken, damit man im Einsatzfall auch die selten verwendeten Hydranten schnell findet. Künftig sollen hier auch die Koordinaten der Hydranten aus den Nachbargemeinen eingespielt werden. Wird diese bei einem Einsatz unterstützt kann man bereits auf solche Daten zurückgreifen.</p>
<p>Für die GoPal-Geräte bieten sich im Grunde drei Ansatzpunkte für das einspielen eigener Daten:</p>
<ol>
<li>Originäre Kartedaten/POIs im .PSF-Format</li>
<li>Routen/ Tracks</li>
<li>Eigenständige Programme</li>
</ol>
<p><span id="more-336"></span><br />
Das vorliegende Geräte ist ein Medion E4430 auf Windows CE Basis mit einem ARM Prozessor. Die GoPal Navigationssoftware (AE 4.7) greift auf NavTeq ( <-> Map24 ) Kartenmaterial zurück. Ausgeliefert werden z.B. schon erweiterte Points-of-Interest im .PSF-Format. Wie sollte es anders sein: Eine Liste mit ALDI-Märkten.</p>
<p><strong>1. Originäre Kartedaten/POIs im .PSF-Format</strong><br />
Leider habe ich keine aktuelle Software oder igendeine art Script gefunden ( und noch herunterladtbar wäre ), dass aus irgendeinem Rohmaterial das binäre .PSF-Format generiert, noch eine nachbaubare Beschreibung des Formates. Damit konnte ich diese Variante leider nicht weiterverfolgen.</p>
<p><strong>2. Routen/ Tracks</strong><br />
Innerhalb der GoPal Software ist es möglich gefahre Routen zu speichern ( &#8220;Menü&#8221; -> &#8220;Route bearbeiten&#8221; -> &#8220;laden/speichern&#8221;). Wie der Navigationspunkt verrät können gespeicherte Routen auch wieder geladen werden. GoPal speichert die Routen in einem XML-Format ab. Es ist also nicht schwirig eine entsprechende Beispieldatei vom Navi zu laden und die eigenen Daten nach dem gleichen Muster anzulegen. Danach reicht es die eigene XML-Datei auf das Gerät zu laden. Die Route kann ausgewählt werden und die einzelnen Marker erscheinen als kleine Fähnchen in der Karte. </p>
<p>Ungünstig nur, dass das Navi nun mal eine Route erstellen will, also aus den einzelnen Einträgen eine zusammenhängende Strecke errechnet ( was im Beispiel der Hydranten keine sinnhafte Strecke ergibt und auch eine gewisse Berechnungszeit in Anspruch nimmt ). Anschließend nervt das Navi natürlich mit Fahrtanweisungen entlang der &#8220;Route&#8221; ( Lautlose Stimme hilft in diesem Fall weiter ). Der Vorteil ist nun aber, dass jeder meiner Hydranten als kleine Fahne direkt in der Karte zu sehen ist. Leider keine weiteren Angaben, wie z.B. dessen Größe.</p>
<p>Eine solche Route oder Tour XML besteht aus dem tour-Rootelement, einem options-Element, der verschiedene Reiseparameter definiert, sowie einer Menge an dest-Elementen, die die einzelnen Ziele oder Positionen darstellen:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;ISO-8859-1&quot;</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tour<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;options</span> <span style="color: #000066;">VehicleSpeedNonMotorway</span>=<span style="color: #ff0000;">&quot;27&quot;</span> <span style="color: #000066;">VehicleSpeedMotorway</span>=<span style="color: #ff0000;">&quot;33&quot;</span> <span style="color: #000066;">VehicleSpeedInPedestrianArea</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Type</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">Tunnels</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">TollRoad</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">TTIMode</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">PedestrianSpeed</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">MotorWays</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Mode</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Ferries</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">CyclistSpeed</span>=<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dest</span> <span style="color: #000066;">Longitude</span>=<span style="color: #ff0000;">&quot;1016948&quot;</span> <span style="color: #000066;">Latitude</span>=<span style="color: #ff0000;">&quot;7152347&quot;</span> <span style="color: #000066;">Country</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">City</span>=<span style="color: #ff0000;">&quot;H100&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dest</span> <span style="color: #000066;">Longitude</span>=<span style="color: #ff0000;">&quot;1016823&quot;</span> <span style="color: #000066;">Latitude</span>=<span style="color: #ff0000;">&quot;7152340&quot;</span> <span style="color: #000066;">Country</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">City</span>=<span style="color: #ff0000;">&quot;H100&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Die Länge und Breite wird hier nicht wie sonst üblich mit Fließkommawerten angegeben. Ein tolles Tool mit dem man diese Routen-XML ganz schnell aus den verschiedensten Quellformaten erstellen kann ( und genauso in alle anderen Formate wandelt ) ist der <a href="http://www.routeconverter.de/">RouteConverter (nur Win) von Christian Pesch</a>.<br />
Wenn man diese simple XML-Datei erstmal erstellt hat braucht man sie nur noch auf das Navi zu kopieren. Dies geht über ActiveSync (Win). Dies findet sich u.a. auf der beigelegten Software CD. Ist ActiveSync auf dem eigenen PC installiert und das Navi über ein USB-Kabel am PC angeschlossen taucht unter Arbeitsplatz ein weiteres Gerät ( Mobiles Gerät ) auf, durch dessen Ordnerstruktur ich dann mittel Explorer navigieren kann.<br />
Die fertige Route XML muss dann unter <em>\My Flash Disk\settings\0\Navigation\tour </em>eingefügt werden. Anschließend taucht ein Eintrag mit dem Dateinamen unter dem Routenmenü ( &#8220;Menü&#8221; -> &#8220;Route bearbeiten&#8221; -> &#8220;laden/speichern&#8221;) auf, der geladen werden kann.</p>
<p><strong>3. Eigenständige Programme</strong><br />
Da der das Navigationsgerät auf Windows basiert kann man natürlich auch noch andere Programme hinzuinstallieren. Dies wäre z.B. der POI-Observer. Man gibt diesem Programm eine Liste mit Geokoordinaten mit. Nähert man sich nun während der Fahrt einem solchen Punkt wird ein Soundfile abgespielt und eine Grafik eingeblendet um auf diesen besondern Punkt hinzuweisen ( gerne genommen für Blitzer ). Der <a href="http://www.poiobserver.com/">POI-Observer</a> wird erstellt und gepflegt von der Forengemeinschaft NaviFriends. Das einzige was man dagegen sagen kann, ist das sich ein Forum nicht recht gut eignet wenn man sich dem Thema das erste Mal nähert ( die wichtigsten Links folgen ).</p>
<p>Zuerstmal muss der POI-Oberserver auf dem Navi installiert werden. Dazu gibt es inzwischen einen <a href="http://www.gopalworld.de/downloads.php?view=detail&#038;df_id=79">einfachen Installer</a>. Dieser muss einfach bei angeschlossenem Navi auf dem eigenen PC gestartet werden. Hinweis: Im Installationsverlauf kann man zwar auswählen wo die Dateien installiert werden sollen ( auf dem Flashspeicher des Navi oder auf einer weiteren SD-Karte ), aber der Installer bricht bei Nichtvorhandensein einer SD-Karte leider schon vorher ab, Also bitte schnell mal eine Karte einlegen. </p>
<p>Beim Installieren wie immer Ja und Amen und der POI-Observer ist schon installiert. Wenn man das Navi jetzt einmal durchstartet ( auf den On/Off-Knopf oben auf dem Gerät und anschließend das Reload-Symbol auf dem Bildschirm betätigen ), startet der POI-Observer im Hintergrund mit. Wenn der Observer läuft ist dies zu erkennen an einem kleinen roten bzw. grünen Quadrat in der untereren linken Ecke.</p>
<p>Nun geht es darum seine eigenen Koordinaten dem POI-Oberserver bereitzustellen. Das macht man mit der <em>observer.obs</em>-Datei. Diese liegt im Installationsverzeichnis auf dem Navi ( \Storage Card\poiobserver ). Diese Datei enthält das Mapping zwischen den Geokoordinaten, dem abzuspielenden Sound und dem Bild sowie der Auslösebedingung für Sound und Bild ( z.B. 100m vor Erreichen des Punktes ). </p>
<p>Um die Observer-Datei zu erstellen wird eine .asc-Datei in das binäre Format gewandelt. Die .asc-Datei hält kommasepariert Länge, Breite und eine Ortsbeschreibung und ist daher ebenfalls einfach zu erstellen:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">;Hydrantenplan 02.01.2010 <span style="color: #cc66cc;">14</span>:01:<span style="color: #cc66cc;">10</span> Sebastian Martens 
<span style="color: #cc66cc;">9.1460</span>,<span style="color: #cc66cc;">53.9480</span>,<span style="color: #ff0000;">&quot;100|Eddelak- Wilhelm-Johnson-Str. 8&quot;</span>
<span style="color: #cc66cc;">9.1445</span>,<span style="color: #cc66cc;">53.9482</span>,<span style="color: #ff0000;">&quot;100|Eddelak- Hugo-Gehrts-Str. 5&quot;</span>
<span style="color: #cc66cc;">9.1448</span>,<span style="color: #cc66cc;">53.9488</span>,<span style="color: #ff0000;">&quot;100|Eddelak- Wilhelm-Johnson-Str.&quot;</span></pre></div></div>

<p>Achtung: Beim Erstellen der Datei sollte darauf geachtet werden, dass die Beschreibung in doppelten Anführungszeichen steht und auch in der Beschreibung kein Komma (oder evtl. anderes verwendetes Trennzeichen) vorkommt. </p>
<p>Will man verschiedenartige Ereignisse in einer Oberserver-Datei verwenden, z.B. die verschiedenen Größen von Hydranten, dann muss pro Ereignisart eine eigene .asc-Datei erstellt werden. Anschließend können mehrere asc-Dateien mit unterschiedlichen Einstellungen zu einer Observer-Datei kombiniert werden.</p>
<p>Das Erstellen der Observer-Datei aus den einzelnen asc-Dateien übernimmt das Programm <em>POIConfigurator+.exe</em>. Dieses bekommt man als Teil des sog. <a href="http://www.navifriends.com/phpbbForum/viewtopic.php?f=57&#038;t=5959&#038;start=0&#038;st=0&#038;sk=t&#038;sd=a">Newbie-Pakets</a>. Das Ganze einmal auf der eigenen Platte entpacken und unter PC-Programme nachschauen. In dem Ordner Manuals finden sich auch ein paar nützliche weitere Hinweise. </p>
<p>Hat man sich selber noch keine Navigationsdatei erstellt, die die Verwaltung mehrer asc-Datei und deren Einstellungen übernimmt, reicht ein Klick auf <em>Hinzufügen</em>. Dies erstellt einen neuen Eintrag für eine asc-Datei die in die neue Observer-Datei integriert werden soll. Auf der rechten Seite lassen sich dann verschiedene Einstellungen vornehmen. Die wichtigsten sind das Auswählen einer asc-Datei. Das Auswählen einer Bitmap-Datei ( dem Symbol das angezeigt werden soll ): hier am besten eine 8-bit Bitmap verwendet. Der Wert <em>IV Dist,</em> also der Auslöseeigenschaft, z.B. angegeben in Sekunden vor Erreichen des Punktes oder in Meter vor Erreichen des Punktes. Und schließlich die Wahl eines Sounds der Abgespielt werden soll. Achtung: Bei Verwendung von Sound und Bild müssen diese den gleichen Dateinamen ( nicht die gleiche Dateiendung ) haben, ansonsten überschreibt der Name der Sounddatei den Namen der Bilddatei und es wird immer versucht das falsche Bild zu laden ( bis mir das aufgefallen war &#8230;. ). Wenn alles fertig ist ein Klick auf Konvertieren und die aktuelle Observer-Datei befindet sich im POI-Verzeichnis. Dann nur noch auf das Gerät kopieren, durchstarten und testen. Nicht vergessen auch die Bilder und Sound in die entsprechenden Verzeichnisse aufs Navi zu kopieren.</p>
<p>Auf dem Navi befinden sich noch drei .ini-Dateien zum Konfigurieren des Observers. Eine nützliche Einstellung ist in der <em>ObsGlobals.ini</em> der Wert <em>AnnounceOpenTime</em> der die Zeit enthält wie lange ein Warnsymbol angezeigt wird.</p>
<p>Alles Weiter gibts in der Foren von <a href="http://www.navifriends.com/">http://www.navifriends.com/</a> und <a href="http://www.gopalworld.de/">http://www.gopalworld.de/</a>. Eine Anmeldung ist nötig um die meisten der oben verlinkten Dateien herunterzuladen.</p>
<p>cheers,<br />
Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sebastian-martens.de/2010/01/medion-navigationsgerat-gopal-auf-wince-mit-eigenen-geokoordinaten-pois-erweitern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.328 seconds -->
<!-- Cached page served by WP-Cache -->
