<?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>Michael Fretz - Interaction Designer &#187; Coding</title>
	<atom:link href="http://www.michaelfretz.com/category/studium/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelfretz.com</link>
	<description>Interaction Design Studium Blog</description>
	<lastBuildDate>Sat, 25 Jun 2011 20:57:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Ventana &#8211; Interactive Shop Window &#8211; Bachelor Project</title>
		<link>http://www.michaelfretz.com/2011/06/11/ventana-interactive-shop-window-bachelor-project/</link>
		<comments>http://www.michaelfretz.com/2011/06/11/ventana-interactive-shop-window-bachelor-project/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 08:33:44 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Film]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Studium]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3405</guid>
		<description><![CDATA[Today, retail stores are finding themselves in a fierce competition with e-commerce stores. By bringing the latest technologies to these physical locations, Ventana is trying to provide a solution to this problem. Installed in the shop‘s window, Ventana enables passing potential customers to interact with a digital representation of the store‘s inventory. Now, well informed, [...]]]></description>
			<content:encoded><![CDATA[<p>Today, retail stores are finding themselves in a fierce competition with e-commerce stores. By bringing the latest technologies to these physical locations, Ventana is trying to provide a solution to this problem. Installed in the shop‘s window, Ventana enables passing potential customers to interact with a digital representation of the store‘s inventory. Now, well informed, the customer is more likely to enter the shop.<br />
Ventana is designed to allow the presentation of any kind of information. It could be used to present fashion, jewelry or a restaurants menu. For our purposes Ventana is showing two products thematizing the US city New York. By the mere presence in front of the window a user can navigate and interactively experience the digital space.<br />
The non-stop availability of the stores inventory breaks the boundaries between the digital and the real world and has the potential to attract many more customers. And as touch-less sensors become more affordable we will see many more applications of this kind, which will open up a range of completely new possibilities. Kinect, for example, would allow us to determine a customers body size and use it as a filter on the inventory and thus tailoring the information to the users needs.</p>
<p><iframe width="580" height="360" src="http://www.youtube.com/embed/VR8XkpKc3Rc?rel=0" frameborder="0" allowfullscreen></iframe><br />
<span id="more-3405"></span><br />
Ventana is designed to allow the presentation of any kind of information. It could be used to present fashion, jewelery or even a restaurants menu. Ventana can be installed in any shop window.<br />
For our purposes Ventana is showing two products thematizing the US city New York. By the mere presence in front of the window a user can navigate and interactively experience the digital space.<br />
Through the use of inexpensive technology it is affordable for a wide varaity of shops. It can be used for very small interaction with the shop windows content up to very complex games and e-commerce solutions.</p>
<p>Ventana is my bachelor project from my studies in the Interaction Design program at the university of the arts in Zurich. (<a href="http://iad.zhdk.ch">iad.zhdk.ch</a>)</p>
<p><strong>Menthors</strong><br />
- Max Rheiner<br />
- Karmen Franinovic </p>
<p><strong>Processblog</strong><br />
<a href="http://ba.michaelfretz.com">http://ba.michaelfretz.com</a></p>
<p><strong>Download</strong><br />
Download the bachelor thesis <a href="http://ba.michaelfretz.com/wp-content/uploads/2011/06/thesis_ventana_web.pdf">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2011/06/11/ventana-interactive-shop-window-bachelor-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Punkt.Fizen – Android and Arduino powered Bike Navigation</title>
		<link>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/</link>
		<comments>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 14:56:05 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3348</guid>
		<description><![CDATA[How does one orient oneself while biking, for example as a tourist? You certainly will read traffic signs, ask people for direction or use a tourist-map. But at least the last example will force you to stop the bike. How could we provide a navigation, where the flow remains undisturbed? The user will need a [...]]]></description>
			<content:encoded><![CDATA[<p>How does one orient oneself while biking, for example as a tourist? You certainly will read traffic signs, ask people for direction or use a tourist-map. But at least the last example will force you to stop the bike. How could we provide a navigation, where the flow remains undisturbed?<br />
The user will need a very unimposing feedback where to go.</p>
<p>Punkt.Fizn is an Android and Arduino powered bike navigation system. Unlike most navigation systems we didn’t focus on a display. Instead directions will be given only through vibrations in the handlebars. Riding a bike with Punkt.Fizn is like knowing your way already.</p>
<p><iframe src="http://player.vimeo.com/video/18481357?byline=0&amp;portrait=0" width="580" height="326" frameborder="0"></iframe></p>
<p><span id="more-3348"></span><br />
<strong>How does it work?</strong><br />
1. Choose a route from <a href="http://www.openrouteservice.org/">openrouteservice</a><br />
2. Download the route XML<br />
3. Upload it <a href="http://gps.alaingroeneweg.com/">here</a><br />
4. Start the android app and enjoy your bike ride&#8230;</p>
<p>Every time you have to turn, gentle vibrations in the handlebars will show you the way.<br />
<img src="http://www.michaelfretz.com/wp-content/uploads/2011/01/bike_with_handlebars.jpg" alt="" title="bike with handlebars" width="567" height="285" class="alignnone size-full wp-image-3398" /></p>
<p><strong>Material research:</strong><br />
We tried different materials in order to compare its conductibility of vibration. At first we used “Thermoplast”, plastic-granulate which melts on 60Celsius.<br />
Its mold able, when still warm and gets very strong and quite flexible when cooled.<br />
Unfortunately you can’t sanding it very good and it has a poor grind ability.<br />
<img class="alignnone size-full wp-image-3352" title="material01" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/material01.jpg" alt="" width="567" height="337" /><br />
So we decided to try a soft industrial-design-foam which was good to work with.<br />
The conductibility of the vibration was very good. One draw back with this material was its indurabilty.</p>
<p><img class="alignnone size-full wp-image-3353" title="blue_handle" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/blue_handle.jpg" alt="" width="567" height="378" /></p>
<p><img class="alignnone size-full wp-image-3354" title="handle_foam1" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/handle_foam1.jpg" alt="" width="567" height="376" /></p>
<p>Finally we used a more durable foam. Its has a good vibra-conductabilty and its workability lead to a smooth surface.</p>
<p><img class="alignnone size-full wp-image-3355" title="handle_finish2" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/handle_finish2.jpg" alt="" width="567" height="377" /></p>
<p><img class="alignnone size-full wp-image-3357" title="tube22" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/tube22.jpg" alt="" width="567" height="339" /></p>
<p><img class="alignnone size-full wp-image-3356" title="final1" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/final1.jpg" alt="" width="567" height="339" /></p>
<p><strong>Coding:</strong><br />
To create a relatively simple but working navigation we wrote an Android application. We used Bluetooth to communicate between Android and Arduino..<br />
Our code is based on the Bluetooth Chat Example from Android.com.<br />
There are two Android Examples available:<br />
1. <a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/Android2ArduinoNavigation.zip">Navigation System</a><br />
2. <a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/Android2Arduino.zip">Demo Example</a> (can be a good starting point if you want to build your own Android 2 Arduino Example)<br />
<img src="http://www.michaelfretz.com/wp-content/uploads/2011/01/manual_app.jpg" alt="" title="manual_app" width="567" height="339" class="alignnone size-full wp-image-3381" /></p>
<p><strong>PHP Script</strong><br />
To get the routing we used OpenRouteService. Since the OpenRouteService XML data could not directly addressed over an API, we had to build a small PHP script that allows to simplify the desired route of OpenRouteService.org and load it up in the right format to a webserver. To parse and rebuild the XML we used SimpleXML from PHP. The current state of the navigation system is a prototype. Therefore only one device can access it at the time.<br />
Here is the sourcecode of this script:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">		Routeuploader
&nbsp;
<span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span>Bike<span style="color: #339933;">-</span>Navigation<span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
&nbsp;
&nbsp;
<span style="color: #339933;">&lt;</span>a id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;link&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://openrouteservice.org/&quot;</span><span style="color: #339933;">&gt;</span>download openrouteservice<span style="color: #339933;">-</span>xml here<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;!--</span> The data encoding type<span style="color: #339933;">,</span> enctype<span style="color: #339933;">,</span> MUST be specified <span style="color: #b1b100;">as</span> below <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>form enctype<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;multipart/form-data&quot;</span> method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #339933;">&gt;&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;phpMyAdmin&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;3qaPcWk7TqTEf77hyhNmbFFoa%2C1&quot;</span> <span style="color: #339933;">/&gt;</span>
    		<span style="color: #339933;">&lt;!--</span> MAX_FILE_SIZE must precede the <span style="color: #990000;">file</span> input field <span style="color: #339933;">--&gt;</span>
&nbsp;
   			 <span style="color: #339933;">&lt;!--</span> Name of input element determines name in <span style="color: #000088;">$_FILES</span> <span style="color: #990000;">array</span> <span style="color: #339933;">--&gt;</span>
			 <span style="color: #004000;">Send</span> this <span style="color: #990000;">file</span><span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Arduino</strong><br />
The Arduino microcontroller recieves the sent values from the Android application and starts a vibrations pattern for the handlebars. For each direction we have two different patterns.<br />
Here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// This Code Reads the Serial Data whoch comes from Android</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">char</span> incomingByte <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// for incoming serial data</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ------ DIRECTION PINS INIT ---------------------</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLeft<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">13</span>, <span style="color: #cc66cc;">14</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLittleLeft<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayRight<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLittleRight<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// ------------------------------------------------</span>
<span style="color: #000066; font-weight: bold;">int</span> timer <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> timerLittle <span style="color: #339933;">=</span><span style="color: #cc66cc;">400</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> count <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Start serial communication</span>
  Serial1.<span style="color: #006633;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">115200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">57600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>     <span style="color: #666666; font-style: italic;">//////////////// LINKS     pinMode(pinArrayLeft[count], OUTPUT);     pinMode(pinArrayLittleLeft[count], OUTPUT);     //////////////// RECHTS     pinMode(pinArrayRight[count], OUTPUT);     pinMode(pinArrayLittleRight[count], OUTPUT);   } } void loop() {   while (Serial1.available() &amp;gt; 0)</span>
  <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">byte</span> serialreadbytevalue <span style="color: #339933;">=</span> Serial1.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    Serial.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>serialreadbytevalue<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>serialreadbytevalue<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">49</span><span style="color: #339933;">:</span>
        goLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">:</span>
        goLittleLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">51</span><span style="color: #339933;">:</span>
        goRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">52</span><span style="color: #339933;">:</span>
        goLittleRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<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: #000066; font-weight: bold;">void</span> goLittleLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goLittleRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Next Steps</strong><br />
The next step would be integrate <a href="http://code.google.com/p/osmand/">OSMAND</a> for the navigation. This way the hole navigation process would be easier.</p>
<p><strong>Team</strong><br />
<a href="http://www.alaingroeneweg.com" target="_blank">Alain Groeneweg</a> | <a href="http://dannyandme.ch/" target="_blank">Danny Arielli</a> | <a href="http://www.michaelfretz.com" target="_blank">Michael Fretz</a></p>
<p><strong>Links to site or magazines that mention us</strong><br />
<a href="http://androidportal.hu/2011-01-09/navigalj-bringan-androiddal-biztonsagosan">androidportal.hu</a><br />
<a href="http://www.androidpolice.com/2011/01/06/android-device-built-into-handlebars-bike-navigation-evolved/">androidpolice.com</a><br />
<a href="http://techup.ch/105/40th-swiss-flash-user-group-meeting">http://techup.ch/105/40th-swiss-flash-user-group-meeting</a><br />
<a href="http://iad.zhdk.ch/de/stories/11/01/embodied-interaction-press">http://iad.zhdk.ch/de/stories/11/01/embodied-interaction-press</a><br />
<a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/IMAG0060.jpg">Weave, interactive design, konzeption &#038; development 02.11 April/Mai Page 16</a></p>
<p><em>This project was part of Embodied Interacion Modul at the Interaction Design Programm from the university of the arts in Zurich. All infos about this course <a href="http://blogs.iad.zhdk.ch/embodied-interaction/bike-navigatio/">http://blogs.iad.zhdk.ch/embodied-interaction/bike-navigatio/</a><br />
Teachers: Max Rheiner and Karmen Franinovic</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Color Browse &#8211; iPhone App</title>
		<link>http://www.michaelfretz.com/2010/10/24/color-browse-iphone-app/</link>
		<comments>http://www.michaelfretz.com/2010/10/24/color-browse-iphone-app/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 07:40:45 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3300</guid>
		<description><![CDATA[Color Browse is an iPhone application that allows you to easily discover the huge archive of the poster collection of the University of the Arts Zürich. As the average user is rarely familiar with the exact artist names or other search criteria, I decided to pursue an approach that let&#8217;s the user sample a color [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3302" title="Color Browse - iPhone App" src="http://www.michaelfretz.com/wp-content/uploads/2010/10/teaser_color_app.jpg" alt="" width="580" height="120" /></p>
<p>Color Browse is an iPhone application that allows you to easily discover the huge archive of the poster collection of the University of the Arts Zürich. As the average user is rarely familiar with the exact artist names or other search criteria, I decided to pursue an approach that let&#8217;s the user sample a color to discover posters containing mainly that sampled color. This approach makes it possible to surf endlessly through the posters and discover new posters and artists at the same time. If a user is interested in a poster he then can retrieve more information about it. Using the iPhones touch screen the user can move his finger over the surface of a displayed poster and a display shows the color currently below the finger. When the user removes the finger the color is selected and a new poster is loaded that has an average color value of the selected color.</p>
<p><span id="more-3300"></span><img class="alignnone size-full wp-image-3303" title="Color Browse - iPhone App" src="http://www.michaelfretz.com/wp-content/uploads/2010/10/colorbrowse-1.jpg" alt="" width="580" height="326" /></p>
<p><strong>Design</strong><br />
The user interface design concept is very minimal. Intentionally I only used little color to not distract from the posters. Additionally it was very important to me to design a usability and interaction model that is self-explanatory. Hence the user interface is very reduced and very simplistic, kept in bright colors to put the posters in the foreground.</p>
<p><img class="alignnone size-full wp-image-3304" title="Color Browse - iPhone App" src="http://www.michaelfretz.com/wp-content/uploads/2010/10/colorbrowse-2.jpg" alt="" width="580" height="326" /></p>
<p><strong>Coding</strong><br />
For the implementation of the iPhone application, I used the iPhone SDK using Objective-C and the Cocoa Touch Framework. Diving into a new programming language, being a beginner again, is always hard. But soon I was able to apply the already familiar object oriented concepts and was able to get around the language fairly quickly. I will definitely implement more projects in it in the future using Cocoa Touch.</p>
<p><img class="alignnone size-full wp-image-3305" title="Color Browse - iPhone App" src="http://www.michaelfretz.com/wp-content/uploads/2010/10/colorbrowse-3.jpg" alt="" width="580" height="326" /></p>
<p><strong>Further steps</strong><br />
The goal is to release the app in the iTunes AppStore. For that a couple of hurdles have to be mastered. One would be to clarify intellectual ownership legalities with the department of the university. Another one would be to optimize the server side application for better performance to make sure the server won&#8217;t go down should there be high volume traffic. Also on the application I have to do an optimization pass to make sure the memory is managed properly and remove any further bugs. And of course a thorough testing needs to be conducted on all current iOS devices.</p>
<p><strong>Conclusion</strong><br />
Developing iPhone app is a very interesting subject and has big potential for interaction designers. With the Color Browse app i managed to create a different way of navigating a vast library of posters of the museum for design and I hope that its exploratory nature was and will be a lot of fun for the users.</p>
<p><strong>Screencast</strong><br />
<object width="580" height="470"><param name="movie" value="http://www.youtube.com/v/M-lqTvEszwI?hl=de&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/M-lqTvEszwI?hl=de&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="470"></embed></object></p>
<p><strong>Documentatiom</strong><br />
<a href="http://www.michaelfretz.com/wp-content/uploads/2010/10/color_browse_iphone_app.pdf">Read</a> a more detailed <a href="http://www.michaelfretz.com/wp-content/uploads/2010/10/color_browse_iphone_app.pdf">documentation</a> of the project. (German only)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/10/24/color-browse-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website for Sridhanwantari published</title>
		<link>http://www.michaelfretz.com/2010/09/19/website-sridhanwantari-published/</link>
		<comments>http://www.michaelfretz.com/2010/09/19/website-sridhanwantari-published/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 13:48:27 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3285</guid>
		<description><![CDATA[Together with my company Cubera Solutions GmbH I published a new client website. It was our first project together with our new graphic designer and friend Michèle Gnos. Building this website with her was a good and successful experience. The website is about Ayurveda therapy in Indonesia, a special therapy for many different problems. Wile [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3287" title="sridhanwantari" src="http://www.michaelfretz.com/wp-content/uploads/2010/09/sridhanwantari_00.jpg" alt="" width="580" height="120" /></p>
<p>Together with my company <a href="http://www.cubera.ch" target="_blank">Cubera Solutions GmbH</a> I published a new client website. It was our first project together with our new graphic designer and friend <a href="http://www.michelegnos.ch/" target="_blank">Michèle Gnos</a>. Building this website with her was a good and successful experience.<br />
The <a href="http://www.sridhanwantari.com" target="_blank">website</a> is about <a href="http://en.wikipedia.org/wiki/Ayurveda" target="_blank">Ayurveda</a> therapy in Indonesia, a special therapy for many different problems.</p>
<p><span id="more-3285"></span><img class="alignnone size-full wp-image-3289" title="sridhanwantari" src="http://www.michaelfretz.com/wp-content/uploads/2010/09/sridhanwantari_02.jpg" alt="" width="580" height="506" /></p>
<p>Wile building the design we tried to bring in the different &#8220;Doshas&#8221;:</p>
<ul>
<li>Vata(Air, Wind) and Pitta (Water), this part should be demonstrated with  the blue areas in the design. Furthermore we added a zodiac sign. The  sign of Libra which stands for balance and stability.</li>
<li>Kapha is demonstrated with the use of the different brown colors.</li>
</ul>
<p>We used plants in the design because its an important part of the Ayurveda therapy.</p>
<p><img class="alignnone size-full wp-image-3288" title="sridhanwantari" src="http://www.michaelfretz.com/wp-content/uploads/2010/09/sridhanwantari_01.jpg" alt="" width="580" height="506" /></p>
<p>Another aspect of building the design was the simplicity. We focused on a easy to use layout and tried to make it a clean and fast loading design.</p>
<p>Behind the website we used the Cubera CMS, a content management system build by our company. This way we can provide a easy cms for our client without making the maintain for the client to complicated. The website is build in French and English.</p>
<p>Thanks to Michèle Gnos for this great Design and Dominik Brumm for his support with the CMS.</p>
<p><img class="alignnone size-full wp-image-3290" title="sridhanwantari" src="http://www.michaelfretz.com/wp-content/uploads/2010/09/sridhanwantari_03.jpg" alt="" width="580" height="506" /></p>
<p>Visit the website here: <a href="http://www.sridhanwantari.com" target="_blank">www.sridhanwantari.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/09/19/website-sridhanwantari-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migros Terra Suisse &#8211; Who Is Muh</title>
		<link>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/</link>
		<comments>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:17:42 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Webapplikation]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[migros]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3228</guid>
		<description><![CDATA[The last couple of weeks I had the possibility to work for Jung von Matt, one of the leading advertisement agencies in Europe. I worked on different small projects but mainly on the Migros Terra Suisse Microsite &#8220;Who is Muh&#8221;. What is &#8220;Who is Muh&#8221;? &#8220;Who is Muh&#8221; is an interactive platform for the Migros [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of weeks I had the possibility to work for <a href="http://www.jvm.ch" target="_blank">Jung von Matt</a>, one of the leading advertisement agencies in Europe. I worked on different small projects but mainly on the <a href="http://94.126.17.222/" target="_blank">Migros Terra Suisse Microsite &#8220;Who is Muh&#8221;</a>.</p>
<p><strong>What is &#8220;Who is Muh&#8221;?</strong><br />
&#8220;Who is Muh&#8221; is an interactive platform for the Migros brand Terra Suisse. This interactive site shows different animals from the Terra Suisse program and explains what each animal does and how the animals are being treated and raised by their farmers.</p>
<p><img class="alignnone size-full wp-image-3243" title="migros_terrasuisse" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/migros_terrasuisse2.jpg" alt="" width="578" height="419" /></p>
<p><span id="more-3228"></span></p>
<p><strong>Terra Suisse Animals and there Language</strong><br />
In the section animals and their language each animal explains briefly how they are being treated and what they do all day long. Each animal explains some things about its live and the environment it grows up in.</p>
<p><img class="alignnone size-full wp-image-3233" title="terrasuisse_animal_music" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animal_music.jpg" alt="" width="580" height="439" /></p>
<p><strong>Muh Mix</strong><br />
The Muh Mix is a game like part of the site. Per drag and drop users can place animals into a play-list and arrange the order of the animal voices. If a user is happy with his choice he can play the song he created, share it on Facebook or send it through an email to his friends. If a user thinks the song he just made is great he can download it as an mp3 or m4r (iPhone Ring-tone format).</p>
<p><img class="alignnone size-full wp-image-3234" title="terrasuisse_animal_sound_1" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animal_sound_1.jpg" alt="" width="580" height="439" /></p>
<p><img class="alignnone size-full wp-image-3235" title="terrasuisse_animals_sound" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animals_sound.jpg" alt="" width="580" height="439" /></p>
<p><strong>iPhone App</strong><br />
In addition to this site there is an iPhone app, available on the iTunes Store. Install it and enjoy cute animals on your phone.</p>
<p><img class="alignnone size-full wp-image-3236" title="terrasuisse_iphone" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_iphone.jpg" alt="" width="580" height="439" /></p>
<p><strong>Coding Base</strong><br />
The hole application is build in Object Oriented AS3. I was able to apply some design patterns in this app, for example I applied the singelton pattern on the objects that store the data in the application. This enabled me easy access to all my data from anywhere in the application.. Everything language related is saved in XML and dynamicaly loaded by the migros website. The platform runs on a FreeBSD server managed by my own Company <a href="http://www.cubera.ch" target="_blank">Cubera Solutions GmbH</a>. For generating the mp3 and m4r we created a php script which concatted the different small animal sound fragments to one mp3 file and for the secondary download option as m4r we used ffmpeg to convert.</p>
<p><img class="alignnone size-full  wp-image-3237" title="terrasuisse_tellafriend" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_tellafriend.jpg" alt="" width="580" height="439" /></p>
<p><img class="alignnone size-full wp-image-3239" title="iPhoneApp" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/iPhoneApp.jpg" alt="" width="580" height="439" /></p>
<p><strong>Looking back</strong><br />
After finishing this project I&#8217;m very happy with it. All requested functionality could be built even-though we didn&#8217;t know if it is possible in the first place. The site works quite good and its cute and fun to play with it.<br />
Many thanks to Claude Ebersold from <a href="http://www.jvm.ch" target="_blank">Jung von Matt</a> for providing all the cute graphics and for pushing me to work all day and night. Also thanks to Nadja Holdener for helping us where-ever help was needed, for creating many of the animations, and especially for learning and handling SVN so quickly. A special thank goes to Matthias Adolf for leading the project and letting me be part of it. Thank you all!</p>
<p><strong>Try it</strong><br />
You can try this application <a href="http://94.126.17.222/" target="_blank">here</a> (german)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using AJAX To Load Data From PHP Into Your Website</title>
		<link>http://www.michaelfretz.com/2010/04/21/using-ajax-to-load-data-from-php-into-your-website/</link>
		<comments>http://www.michaelfretz.com/2010/04/21/using-ajax-to-load-data-from-php-into-your-website/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 08:44:24 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3212</guid>
		<description><![CDATA[A few days ago I had to build a web-app for a mobile device. The problem was, that some external input device changed values in a database and I had to make this visible in my web-app. I came across a good solution from the w3c school. The problem was that this only updated with [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I had to build a web-app for a mobile device. The problem  was, that some external input device changed values in a database and I  had to make this visible in my web-app.</p>
<p>I came across a good  solution from the <a href="http://www.w3schools.com/php/php_ajax_database.asp" target="_blank">w3c school</a>. The problem was that  this only updated with a user input. Therefore I changed quite some  part of their script and made it easy understandable. To keep the coding  part as small and easy as possible, I will not access a database in my  example. My PHP  script only displays the PHP function <a href="http://ch.php.net/manual/de/function.date.php" target="_blank">date(&#8220;H:i:s&#8221;);</a> which  shows the current time. You could easy build what ever you want in the  the PHP  script but keep in mind that this code will be called often and could slow down  your server if you have many users and a short refresh  time and therefore to many requests to your server.</p>
<p><strong>Whats do you  need in order to see this example.</strong><br />
I created this example in three  files.<br />
- The HTML File<br />
- The Javascript File<br />
- The PHP File<br />
<span id="more-3212"></span></p>
<p><strong>The  HTML File:</strong><br />
This File loads the Javascript File in order to access  all the Javascript functions. In the &lt;body&gt; tag we load the  function startRefreshing() from the  javascript File</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
&lt;title&gt;Ajax Test&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;test.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;startRefreshing()&quot;&gt;
&nbsp;
    &lt;div id=&quot;idForAJAXReplace&quot;&gt;
    	Placeholder which will be replaced by the PHP content
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p><strong>The Javascript File (test.js)</strong><br />
In the scripts I defined  which PHP  fill should be executed every time the Loop starts. The repeat time is  also defined in this script as well as the id of the DIV tag which  should be replaced by the data sent by the PHP file. Quite some part of this  script are based from the w3c school but I got rid of many unnecessary  stuff for my example.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Config for the javascript part</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> urlForPHP 			<span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;test.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> milsecondsTillRepeat 	<span style="color: #339933;">=</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> idForReplace		<span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;idForAJAXReplace&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> startRefreshing<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	setTimeout<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;startRefreshing()&quot;</span><span style="color: #339933;">,</span>milsecondsTillRepeat<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	reloadPHP<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;">/// the following code is based on http://www.w3schools.com/php/php_ajax_database.asp  but I shorted it quite some bit</span>
<span style="color: #003366; font-weight: bold;">var</span> xmlhttp<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> reloadPHP<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	xmlhttp<span style="color: #339933;">=</span>GetXmlHttpObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>xmlhttp<span style="color: #339933;">==</span><span style="color: #003366; font-weight: bold;">null</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;">&quot;Your Browser does not support HTTP Request&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #003366; font-weight: bold;">var</span> url<span style="color: #339933;">=</span>urlForPHP<span style="color: #339933;">;</span>
	url<span style="color: #339933;">=</span>url<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;?random=&quot;</span><span style="color: #339933;">+</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	xmlhttp.<span style="color: #660066;">onreadystatechange</span><span style="color: #339933;">=</span>stateChanged<span style="color: #339933;">;</span>
	xmlhttp.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>url<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	xmlhttp.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</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> stateChanged<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>xmlhttp.<span style="color: #660066;">readyState</span><span style="color: #339933;">==</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>idForReplace<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span>xmlhttp.<span style="color: #660066;">responseText</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> GetXmlHttpObject<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>window.<span style="color: #660066;">XMLHttpRequest</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// code for IE7+, Firefox, Chrome, Opera, Safari</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">ActiveXObject</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// code for IE6, IE5</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft.XMLHTTP&quot;</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;">return</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>The PHP file (test.php)</strong><br />
This file gets called  every 1000 ms (defined in the Javascript File). For the demo I only  display the current server time. Of course you could display here data  from the database or any other PHP script which you need to have  repeat called by the website.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><a href='http://www.michaelfretz.com/wp-content/uploads/2010/04/ajaxPHP.zip'>Download demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/04/21/using-ajax-to-load-data-from-php-into-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spot the Dogference</title>
		<link>http://www.michaelfretz.com/2010/04/07/spot-the-dogference/</link>
		<comments>http://www.michaelfretz.com/2010/04/07/spot-the-dogference/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 11:31:57 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Almer/Blank]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[pureMVC]]></category>
		<category><![CDATA[USA]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3184</guid>
		<description><![CDATA[Last week, Spot the Dogference  came online as a public beta. Time to write a blog post about this project I worked on during my internship at Almer/Blank. What is this game? Spot the Dogference is an online game of spot the difference featuring pictures of dogs. It has 3 levels and one bonus level. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3186" title="spotthedogference01" src="http://www.michaelfretz.com/wp-content/uploads/2010/04/spotthedogference01.png" alt="" width="580" height="91" /></p>
<p>Last week, Spot the Dogference  came online as a public beta. Time to write a blog post about this project I worked on during my internship at Almer/Blank.</p>
<p><strong>What is this game?</strong></p>
<p>Spot the Dogference is an online game of spot the difference featuring pictures of dogs. It has 3 levels and one bonus level. You can share your score on twitter and it will be displayed on the spot the dogference website.<span id="more-3184"></span></p>
<p><img class="alignnone size-full wp-image-3188" title="spotthedogference03" src="http://www.michaelfretz.com/wp-content/uploads/2010/04/spotthedogference03.png" alt="" width="580" height="388" /></p>
<p><img class="alignnone size-full wp-image-3187" title="spotthedogference02" src="http://www.michaelfretz.com/wp-content/uploads/2010/04/spotthedogference02.png" alt="" width="580" height="387" /></p>
<p>The game itself is built in Actionscript 3 with the <a href="http://www.puremvc.org/" target="_blank">pureMVC</a> framework. It uses <a href="https://www.mochimedia.com/" target="_blank">MocciAds</a> and the <a href="http://blog.swfjunkie.com/2009/12/tweetr-lib-reaches-v1-0b/" target="_blank">Twitter API</a> from Sandro (SWFJunkie)<br />
I contributed in some parts to this game which was originally build by different developers from<a href="http://almerblank.com/" target="_blank"> Almer/Blank.</a></p>
<p><a href="http://spotthedogference.com/" target="_blank">Play it now</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/04/07/spot-the-dogference/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Terminal For Tracing In Actionscript Projects</title>
		<link>http://www.michaelfretz.com/2010/02/21/using-terminal-for-tracing-in-actionscript-projects/</link>
		<comments>http://www.michaelfretz.com/2010/02/21/using-terminal-for-tracing-in-actionscript-projects/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 18:40:44 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3149</guid>
		<description><![CDATA[I think all of you know how to use trace in a flash project therefore I will target only on how to set up an easy tracing environment. I use terminal to display my traces on my Mac. I think this is an convenient way if you work on a dual screen environment. What do [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3151" title="traceinterminal" src="http://www.michaelfretz.com/wp-content/uploads/2010/02/traceinterminal1.jpg" alt="traceinterminal" width="580" height="114" /></p>
<p>I think all of you know how to use trace in a flash project therefore I will target only on how to set up an easy tracing environment. I use terminal to display my traces on my Mac. I think this is an convenient way if you work on a dual screen environment. What do you need to do?<br />
<span id="more-3149"></span>1) Install a Debug Flash Player on your Mac. (<a href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">http://www.adobe.com/support/flashplayer/downloads.html</a>)<br />
2) Go to your home directory on your computer (in my case: /Users/<span>itz</span>/)<br />
3) Check if a file called: &#8220;mm.<span>cfg</span>&#8221; exist<br />
4) If not create one and open it<br />
5) Write this code into the mm.<span>cfg</span> file and make sure the path to the <span>TraceOutPutFileName</span> actually goes to a file called <span>flashlog</span>.<span>txt</span>:</p>
<p><span>TraceOutPutFileName</span>=/Users/<span>itz</span>/Library/Preferences/<span>Macromedia</span>/Flash Player/Logs/<span>flashlog</span>.<span>txt</span><br />
<span>ErrorReportingEnable</span>=1<br />
<span>TraceOutputFileEnable</span>=1<br />
<span>MaxWarnings</span>=100</p>
<p>6) Save the file and close it.<br />
7) Start Terminal<br />
8) Type following and make sure the path to the files are the correct paths of your system and press ENTER: tail -f /Users/<span>itz</span>/Library/Preferences/<span>Macromedia</span>/Flash\ Player/Logs/<span>flashlog</span>.<span>txt</span><br />
8) Start your Flash Project and send out a trace<br />
9) Enjoy working on Flash projects and see traces in your Terminal.<br />
10) Share this post ;)</p>
<p>Tip: If you want to clear your traces press Command K wile your Terminal is active.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/02/21/using-terminal-for-tracing-in-actionscript-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My talk at L.A. Flex User Group Meeting in January</title>
		<link>http://www.michaelfretz.com/2010/02/12/my-talk-at-la-flex-user-group-meeting-in-january/</link>
		<comments>http://www.michaelfretz.com/2010/02/12/my-talk-at-la-flex-user-group-meeting-in-january/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 22:41:09 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[mojofont]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3139</guid>
		<description><![CDATA[Some of you probably read my article about Font Embedding in Actionscript 3 projects. In the January L.A. Flex User Group meeting, Tom Bray recorded my talk about MojoFont. MojoFont is an Eclipse Plugin for easy Font Embedding in Flex, FDT or Eclipse. It was a good experience to speak to the L.A. Flex group. [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you probably read my article about <a href="http://www.michaelfretz.com/2010/01/12/font-embedding-in-actionscript-projects/">Font Embedding in Actionscript 3 projects</a>. In the January <a href="http://groups.adobe.com/groups/2b6ef91865/summary" target="_blank">L.A. Flex User Group </a>meeting, <a href="http://www.tombray.com/2010/02/l-a-flex-video-embedding-fonts-with-mojofont-with-michael-fretz/" target="_blank">Tom Bray</a> recorded my talk about <a href="http://mojofont.badmojo.ch/" target="_blank">MojoFont</a>. MojoFont is an Eclipse Plugin for easy Font Embedding in Flex, FDT or Eclipse. It was a good experience to speak to the L.A. Flex group. Thank you Tom for letting me a part of it. If you want to see my talk watch this video.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="580" height="435" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=9411553&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="580" height="435" src="http://vimeo.com/moogaloop.swf?clip_id=9411553&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.tombray.com/2010/02/l-a-flex-video-embedding-fonts-with-mojofont-with-michael-fretz/" target="_blank">My talk about MojoFont at L.A. Flex User Group</a></p>
<p>Unfortunately the picture quality is not really good but if you want to know more about Font Embedding with MojoFont read my post about <a href="http://www.michaelfretz.com/2010/01/12/font-embedding-in-actionscript-projects/">Font Embedding in Actionscript 3.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/02/12/my-talk-at-la-flex-user-group-meeting-in-january/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>St.Moritz TV</title>
		<link>http://www.michaelfretz.com/2010/02/04/internship-project-st-moritz-tv/</link>
		<comments>http://www.michaelfretz.com/2010/02/04/internship-project-st-moritz-tv/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 23:13:49 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[Webapplikation]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Prototyp]]></category>
		<category><![CDATA[USA]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3105</guid>
		<description><![CDATA[After being here in Los Angeles for about 7 months I think its time to show you some of the projects I worked on. The first project I want to show you is St Moritz TV. What is this project? The website www.StMoritzTV.ch is a Web TV station with short videos about St. Moritz and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3108" title="stmoritztv_01" src="http://www.michaelfretz.com/wp-content/uploads/2010/02/stmoritztv_01.jpg" alt="stmoritztv_01" width="580" height="200" /></p>
<p>After being here in Los Angeles for about 7 months I think its time to show you some of the projects I worked on. The first project I want to show you is St Moritz TV.</p>
<p><strong>What is this project?</strong><br />
The website <a href="http://www.stmoritztv.ch" target="_blank">www.StMoritzTV.ch</a> is a Web TV station with short videos about St. Moritz and the Engadine. The main goal of the website is to inform tourists and locals about events, art, dinning and shopping in St Moritz and its surroundings.</p>
<p><strong>What was the goal?</strong><br />
The current version is a Beta site. Its focus is to see what the needs of the users are and how we can build the final version and what we have to improve. Because this is a Beta site we are asking for any feedback about the site and would highly appreciate if as many of you can try it and give us a  <a href="http://www.surveymonkey.com/s/BCZFQM9" target="_blank">feedback</a>. We want to find out how we can make it most enjoyable for its user.</p>
<p><em>But hey, let&#8217;s get geeky :)</em><br />
<span id="more-3105"></span> <img class="alignnone size-full wp-image-3112" title="stmoritztv_03" src="http://www.michaelfretz.com/wp-content/uploads/2010/02/stmoritztv_03.jpg" alt="stmoritztv_03" width="580" height="200" /><br />
<strong>What technology did I use?</strong></p>
<p><strong>Video player with Open Source Media Framework:</strong></p>
<p>The player is built with the <a href="http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework" target="_blank">Adobes Open Source Media Framework</a>. We had to add some functionality into the player as the version we used didn’t have all functions we needed by the time we developed it. For example we had to build in a video time calculator and a function to read the source for the videos from the XML. Furthermore I had to implement a function to allow jumping to a requested video. For this I used external interface in actionscript to send data into the player from the html page. In this way I do not have to reload the website again if a new video should be played. Of course the play-list is continuously loading the next video as soon as the current video finished playing.<strong></strong></p>
<p><strong>Next Up</strong><br />
The “NextUp” area is build with flash and reads the same XML as the video player. Every time a new video starts to play the video player calls a Javascript function in the html site. This Javascript function send the current played video into the NextUp flash file where I update the view class. If one of the nodes will be pressed in the “Nextup”, it calls a Javascript function too and sends the requested video to the video player.<br />
<img class="alignnone size-full wp-image-3110" title="stmoritztv_02" src="http://www.michaelfretz.com/wp-content/uploads/2010/02/stmoritztv_02.jpg" alt="stmoritztv_02" width="580" height="200" /><br />
<strong>HTML, CSS and Javascript</strong><br />
I created, based on the delivered design by Almer/Blank, the HTML and CSS part of the website. Different Javascript functions are responsible for handling the requested videos and advertisement .</p>
<p><strong>Web hosting</strong><br />
The current version of StMoritzTV is hosted by<a href="http://www.cubera.ch">Cubera Solutions GmbH</a>. Hosting on a Swiss web hosting company helps us to keep ping time low and provides us with a reliable service.<br />
Happy testing :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/02/04/internship-project-st-moritz-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Font Embedding in Actionscript Projects</title>
		<link>http://www.michaelfretz.com/2010/01/12/font-embedding-in-actionscript-projects/</link>
		<comments>http://www.michaelfretz.com/2010/01/12/font-embedding-in-actionscript-projects/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 03:12:14 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[mojofont]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3010</guid>
		<description><![CDATA[While working on Actionscript projects you will have to use fonts quite often. There are many ways how you can embed a font into your project. In this post I will illustrate different ways of how to do that and I would like to demonstrate a very easy way with MojoFont. Example 1: Font Embedding [...]]]></description>
			<content:encoded><![CDATA[<p>While working on Actionscript projects you will have to use fonts quite often. There are many ways how you can embed a font into your project. In this post I will illustrate different ways of how to do that and I would like to demonstrate a very easy way with MojoFont.</p>
<p><span id="more-3010"></span></p>
<p><strong>Example 1: Font Embedding During Runtime With SWF</strong><br />
Embedding a font with <span>SWF</span> has the advantage that it can be loaded on run-time. This will make the file size of the start-up application smaller and improves loading times. The font will be only loaded if there is a need for it. You will need to have Adobe Flash CS4 or higher for this example.<br />
1) Open a new <span>Actionscript</span> 3 file in the Flas IDE and save it as American.<span>fla</span><br />
2) Open the action panel and type following:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span>systemFont=<span style="color: #990000;">&quot;American Typewriter&quot;</span>, <span style="color: #004993;">fontName</span>=<span style="color: #990000;">&quot;American&quot;</span>,
	   mimeType=<span style="color: #990000;">&quot;application/x-font&quot;</span>, unicodeRange=<span style="color: #990000;">&quot;U+0061-U+007A&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> american<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Class</span>;
&nbsp;
<span style="color: #004993;">Font</span>.<span style="color: #004993;">registerFont</span><span style="color: #000000;">&#40;</span>american<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><strong>systemFont</strong> is the actual name of the font on your system.<br />
<strong>fontName</strong> can be named what ever you want to name it.<br />
<strong>unicodeRange</strong> is used to define the avaible characters.</p>
<p>I used for this example only lowercase characters. You can change the <span>unicodeCharset</span> to add more characters. A good website to generate the required <span>unicode</span> is <a href="http://rishida.net/scripts/uniview/conversion.php" target="_blank">http://rishida.net/scripts/uniview/conversion.php</a></p>
<p>3) Compile the <span>SWF</span>. You will be asked for the Flex <span>SDK</span> Path on your first compile. If you have the Flex SDK press OK and compile again otherwise download first the Flex SDK from <a href='http://opensource.adobe.com/wiki/display/flexsdk/'>opensource.adobe.com/wiki/display/flexsdk</a>. Now you should have a blank <span>SWF</span>.</p>
<p>4) Start a new <span>Actionscript</span> 3 file and save it as <span>Fonttest</span>.<span>fla</span> in the same directory as the other file.<br />
5) Open the action panel and type the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">loader</span>.<span style="color: #004993;">contentLoaderInfo</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">INIT</span>, fontloaded<span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #004993;">loader</span>.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'AmericanTypewriter.swf'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> fontloaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> tf<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	tf.<span style="color: #004993;">width</span>			= <span style="color: #000000; font-weight:bold;">400</span>;
	tf.<span style="color: #004993;">embedFonts</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
	tf.<span style="color: #004993;">defaultTextFormat</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextFormat</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'American'</span>, <span style="color: #000000; font-weight:bold;">30</span>, 0x000000<span style="color: #000000;">&#41;</span>;
	tf.<span style="color: #004993;">text</span> = <span style="color: #990000;">'hey you'</span>;
	<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>tf<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>6) Save the file and compile it. You will now load the font from the <span>SWF</span>.</p>
<p>This example is based on the video tutorial from Lee <span>Brimelow</span>. Make sure that you watch his video Tutorial at <a href="http://gotoandlearn.com/play?id=102" target="_blank">http://gotoandlearn.com/play?id=102</a> to dive deeper into loading fonts with external <span>SWF</span>.</p>
<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/FontEmbeddinginFlash.zip">Download Sourcecode including FLA</a></p>
<p><strong>Example 2: Font Embedded In Flash.</strong></p>
<p>Using the [Embed] tag: The font needs to be accessible in your Actionscript project during compile time.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">AntiAliasType</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextFormat</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FontEmbeddingEmbedTag extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;Arial.ttf&quot;</span>, fontFamily=<span style="color: #990000;">&quot;foo&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> bar<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Class</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> FontEmbeddingEmbedTag<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> format<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextFormat</span>              = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextFormat</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			format.<span style="color: #004993;">font</span>                      = <span style="color: #990000;">&quot;foo&quot;</span>;
			format.<span style="color: #004993;">color</span>                = 0xFFFFFF;
			format.<span style="color: #004993;">size</span>                 = <span style="color: #000000; font-weight:bold;">30</span>;
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> label<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span>         = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			label.<span style="color: #004993;">embedFonts</span>            = <span style="color: #0033ff; font-weight: bold;">true</span>;
			label.<span style="color: #004993;">width</span>                    = <span style="color: #000000; font-weight:bold;">300</span>
			label.<span style="color: #004993;">defaultTextFormat</span>     = format;
			label.<span style="color: #004993;">text</span>                  = <span style="color: #990000;">&quot;Hi michaelfretz.com!&quot;</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>label<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/FontEmbeddingEmbedTag.zip">Download Sourcecode</a></p>
<p><strong>Example 3: The MojoFont Way</strong><br />
My favorite way of embedding a font into an Actionscript project is using MojoFont.<br />
You may ask, what is MojoFont? MojoFont is an Eclipse Plugin for embedding Fonts, developed by Philipp Laeubli. MojoFont is still in private beta but will be released soon as a public beta.</p>
<p><strong>Example 3.1: Embedding A Single Font For Basic Textfields With MojoFont</strong><br />
<strong>1)</strong> Apply for a private beta account at <a href="http://mojofont.badmojo.ch/" target="_blank">http://mojofont.badmojo.ch</a> and install it as soon as you get the url for the eclipse update-site.<br />
<strong>2)</strong> Start Flex or FDT and open a new or existing Actionscript 3 project.</p>
<p><img class="alignnone size-full wp-image-3028" title="MojoFontTutorial01" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial01.png" alt="MojoFontTutorial01" width="580" height="225" /></p>
<p><strong>3)</strong> Go to File -&gt; Import -&gt;Other</p>
<p><img class="alignnone size-full wp-image-3029" title="MojoFontTutorial02" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial02.png" alt="MojoFontTutorial02" width="580" height="499" /></p>
<p><strong>4)</strong> Choose MojoFont -&gt; Import and convert Font</p>
<p><img class="alignnone size-full wp-image-3030" title="MojoFontTutorial03" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial03.png" alt="MojoFontTutorial03" width="551" height="551" /></p>
<p><strong>5)</strong> For the First Tutorial we choose the import mode: &#8220;Import a font with a single style&#8221;. This option will allow us to use only one style of th font. A single style font can not be used for HTML textfield. You can make a font bold or italic but to do that you have to import the font with &#8220;import font with multiple font style&#8221;. I will show the import of fonts for HTML textfield in the next example further down.</p>
<p><img class="alignnone size-full wp-image-3031" title="MojoFontTutorial04" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial04.png" alt="MojoFontTutorial04" width="549" height="319" /></p>
<p><strong>6)</strong> Choose a font you want to use and press &#8220;Next &gt;&#8221;.</p>
<p><img class="alignnone size-full wp-image-3033" title="MojoFontTutorial05" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial05.png" alt="MojoFontTutorial05" width="550" height="770" /></p>
<p><img class="alignnone size-full wp-image-3034" title="MojoFontTutorial06" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial06.png" alt="MojoFontTutorial06" width="550" height="769" /><br />
<strong>7)</strong> Select a location in your project where the compiled SWC should be saved. The path to this SWC will be automatically added to your project properties and if you decide to delete a font you have to delete this path too. (Right-click on your project name-&gt;Properties-&gt;Actionscript Build path-&gt;Library path) For the Charset Range we use &#8220;Default / All&#8221;. If you only need some caracters and want to keep the filesize low you can change the settings to &#8220;Predefined&#8221; or &#8220;Custom&#8221;.</p>
<p><img class="alignnone size-full wp-image-3035" title="MojoFontTutorial07" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial07.png" alt="MojoFontTutorial07" width="551" height="771" /><br />
<strong>8)</strong> A quick example how to use it will be shown before you press Finish.</p>
<p><img class="alignnone size-full wp-image-3036" title="MojoFontTutorial08" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial08.png" alt="MojoFontTutorial08" width="550" height="770" /></p>
<p><strong>9)</strong> This is how your Sourcecode should look like if you want to embed a font with MojoFont.</p>
<p><img class="alignnone size-full wp-image-3038" title="MojoFontTutorial09" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial09.png" alt="MojoFontTutorial09" width="580" height="200" /></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MojoFontBasic01 extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MojoFontBasic01<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> txt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span> 	= ComicSansMSRegular.createTextField<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			txt.<span style="color: #004993;">text</span>		= <span style="color: #990000;">'Hi michaelfretz.com'</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>txt<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><strong>10)</strong> The compiled version will look like that</p>
<p><img class="alignnone size-full wp-image-3037" title="MojoFontTutorial10" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial10.png" alt="MojoFontTutorial10" width="514" height="211" /></p>
<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/MojoFontBasic01.zip">Download Sourcecode</a></p>
<p><strong>Example 3.2: Same As Before But With TextFormat</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextFormat</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MojoFontBasic02 extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MojoFontBasic02<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> txtFormat<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextFormat</span> 	= ComicSansMSRegular.createTextFormat<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000000;">&#41;</span>;
			txtFormat.<span style="color: #004993;">color</span>			= 0xff8c00;
			txtFormat.<span style="color: #004993;">kerning</span>		= <span style="color: #000000; font-weight:bold;">2</span>;
			<span style="color: #6699cc; font-weight: bold;">var</span> txt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span>		= ComicSansMSRegular.createTextField<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			txt.<span style="color: #004993;">defaultTextFormat</span>		= txtFormat;
			txt.<span style="color: #004993;">text</span>			= <span style="color: #990000;">'hi michaelfretz.com'</span>;
			txt.<span style="color: #004993;">selectable</span>			= <span style="color: #0033ff; font-weight: bold;">false</span>;
			txt.<span style="color: #004993;">width</span>			= <span style="color: #000000; font-weight:bold;">300</span>;
			txt.<span style="color: #004993;">rotation</span>			= <span style="color: #000000; font-weight:bold;">20</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>txt<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/MojoFontBasic02.zip">Download Sourcecode</a></p>
<p><strong>Example 3.3: Text As HTML Textfield</strong></p>
<p>If you want to use HTML text with your MojoFont import, you need to use &#8220;Import multiple Font Style&#8221; instead of &#8220;Import a font with a single style&#8221;. This will bring you up this window.<strong><br />
</strong></p>
<p><strong><img class="alignnone size-full wp-image-3048" title="MojoFontTutorial11" src="http://www.michaelfretz.com/wp-content/uploads/2010/01/MojoFontTutorial11.png" alt="MojoFontTutorial11" width="548" height="770" /></strong></p>
<p>You can choose for all styles a suitable font. You can even mix fonts in a HTML textfield. The rest will be more or less the same. Here the sourcecode.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MojoFontAdv01 extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MojoFontAdv01<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> txt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span> = Helvetica.createTextField<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			txt.<span style="color: #004993;">htmlText</span> = <span style="color: #990000;">'&lt;strong&gt;Hi&lt;/strong&gt; &lt;em&gt;michael&lt;/em&gt; fretz'</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>txt<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/MojoFontAdv01.zip">Download Sourcecode</a></p>
<p><strong>Example 3.4: HTML Text Same As Before But With TextFormat</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextField</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.<span style="color: #004993;">TextFormat</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MojoFontAdv02 extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MojoFontAdv02<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> txtFormat<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextFormat</span>	= Helvetica.createTextFormat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			txtFormat.<span style="color: #004993;">size</span>				= <span style="color: #000000; font-weight:bold;">20</span>;
			txtFormat.<span style="color: #004993;">color</span>				= 0xff8c00;
			txtFormat.<span style="color: #004993;">underline</span>			=  <span style="color: #0033ff; font-weight: bold;">true</span>;
			<span style="color: #6699cc; font-weight: bold;">var</span> txt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TextField</span>			= Helvetica.createTextField<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			txt.<span style="color: #004993;">defaultTextFormat</span>		= txtFormat;
&nbsp;
			txt.<span style="color: #004993;">multiline</span>				= <span style="color: #0033ff; font-weight: bold;">true</span>;
			txt.<span style="color: #004993;">width</span>					= <span style="color: #000000; font-weight:bold;">300</span>;
			txt.<span style="color: #004993;">wordWrap</span>				= <span style="color: #0033ff; font-weight: bold;">true</span>;
			txt.<span style="color: #004993;">rotation</span>				= <span style="color: #000000; font-weight:bold;">30</span>;
			txt.<span style="color: #004993;">htmlText</span>				= <span style="color: #990000;">'&lt;strong&gt;hi&lt;/strong&gt;
&lt;em&gt;michaelfretz.com&lt;/em&gt;'</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>txt<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://michaelfretz.com/wp-content/uploads/2010/01/MojoFontAdv02.zip">Download Sourcecode</a></p>
<p><strong>Live Demo</strong></p>
<p>If you want to see a live demo of MojoFont join me at the <a href="http://groups.adobe.com/groups/2b6ef91865/summary" target="_blank">LA Flex User Group</a> meeting in Santa Monica <span title="GMT-8 Pacific Time US &amp; Canada">January 13, 2010 from 7:00pm &#8211; 10:00pm where I will held a short presentation about MojoFont. </span>We meet at 12304 Santa Monica Blvd, Suite 215A. California, USA.</p>
<p>or</p>
<p>Join us for the Los Angeles Flash User Group meeting on January 20, 2010 at 525 Venezia Ave.  Venice, CA 90291 <a href="http://www.laflash.org">www.laflash.org</a> where I will talk about FontEmbedding in Actionscript projects.</p>
<p><strong>Thanks</strong></p>
<p>Many special thank to Philipp Laeubli who is the developer and founder of MojoFont. Please visit his project <a href="http://mojofont.badmojo.ch/" target="_blank">website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/01/12/font-embedding-in-actionscript-projects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change image size in CSS if div tag is smaller than the image</title>
		<link>http://www.michaelfretz.com/2009/11/05/change-image-size-in-css-if-div-tag-is-smaller-than-the-image/</link>
		<comments>http://www.michaelfretz.com/2009/11/05/change-image-size-in-css-if-div-tag-is-smaller-than-the-image/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 01:57:03 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2978</guid>
		<description><![CDATA[I run into the problem that I had a div tag with a certain width. From a external site I loaded some content in this div tag. The problem was that I did not have the control over the pictures loaded from this external server. Some pictures where bigger then the size of the div [...]]]></description>
			<content:encoded><![CDATA[<p>I run into the problem that I had a div tag with a certain width. From a external site I loaded some content in this div tag. The problem was that I did not have the control over the pictures loaded from this external server. Some pictures where bigger then the size of the div tag. I didn&#8217;t had the possibility to take the picture and make them smaller with PHP as the source of the picture had to be on the external server. And furthermore, I needed a solution in CSS or Javascript and couldn&#8217;t use something like <a href="http://phpthumb.sourceforge.net/" target="_blank">phpThumb</a>.</p>
<p>My solution was to use this:<br />
<span id="more-2978"></span></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#parent</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#parent</span> img<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;parent&quot;&gt;
	&lt;img src=&quot;http://www.michaelfretz.com/wp-content/uploads/2009/10/IMG_1794.jpg&quot; alt=&quot;Los Angeles&quot; /&gt;
&lt;/div&gt;</pre></div></div>

<p>This way of handling this problem doesn&#8217;t make the file size smaller but it changes the appearance of the image to the width of the div tag. It might not be the best way to do it but it&#8217;s a quick and dirty way which might help you.</p>
<p>The final result of this script is a picture, which is only 50px wide instead of 580px.<br />
The only disadvantage is that the file size of the image is still the same.</p>
<p><a href="http://www.michaelfretz.com/wp-content/uploads/2009/11/changeImageSizeInCSS.zip" target="_blank">Download the Source Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/11/05/change-image-size-in-css-if-div-tag-is-smaller-than-the-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ribbit Workshop</title>
		<link>http://www.michaelfretz.com/2009/10/14/ribbit-workshop/</link>
		<comments>http://www.michaelfretz.com/2009/10/14/ribbit-workshop/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 06:57:54 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AlmerBlankLab]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[VOIP]]></category>
		<category><![CDATA[Workshop]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2942</guid>
		<description><![CDATA[Add Communication to your Applications with Ribbit On Sunday, October 4th, I had the change to visit a workshop about the Ribbit mobile service at the Rich Media Institute in Venice. I could see some examples how to build a Text message application in Flex or Flash and saw different ways to build a phone [...]]]></description>
			<content:encoded><![CDATA[<p>Add Communication to your Applications with Ribbit</p>
<p><a href="http://www.ribbit.com/" target="_blank"><img class="alignnone size-full wp-image-2943" title="Ribbit" src="http://www.michaelfretz.com/wp-content/uploads/2009/10/397368540.png" border="0" alt="Ribbit" width="101" height="38" /></a></p>
<p>On Sunday, October 4<span>th</span>, I had the change to visit a workshop about the <span>Ribbit</span> mobile service at the Rich Media Institute in Venice. I could see some examples how to build a Text message application in Flex or Flash and saw different ways to build a phone application. The combination between <span>Actionscript</span> 3 and a telephone system is quite interesting and I see a great potential in it.</p>
<p><span id="more-2942"></span></p>
<p>The only problem with <span>Ribbit</span> is that they currently only in the USA operate. As soon as they will have other branches in Europe it could be a very interesting alternative to other <span>VOIP</span> systems because it can be build in Flash and integrated in many devices and websites. <span>Ribbit</span> offers many possibilities like Google Voice. A message to Text function is currently one of the coolest feature they have and I look forward to see whats the new version is going to bring.</p>
<p>If you think Ribbit might be a solution for you, contact me. I would like to build a Ribbit application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/10/14/ribbit-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hype Framework Workshop</title>
		<link>http://www.michaelfretz.com/2009/10/13/hype-framework-workshop/</link>
		<comments>http://www.michaelfretz.com/2009/10/13/hype-framework-workshop/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 01:01:10 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internship USA]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AlmerBlankLab]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2893</guid>
		<description><![CDATA[Just before Adobe Max I had the opportunity to visit the Joshua Davis workshop about the  HYPE Framework. The HYPE-framework is a easy framework for creating digital art. It makes it easy to build computer based art in Actionscript 3. Josh is a very outgoing and super friendly person. All of us had really good [...]]]></description>
			<content:encoded><![CDATA[<p>Just before Adobe Max I had the opportunity to visit the Joshua Davis workshop about the  HYPE Framework. The HYPE-framework is a easy framework for creating digital art. It makes it easy to build computer based art in <span>Actionscript</span> 3. Josh is a very outgoing and super friendly person. All of us had really good fun with him. We build a couple of examples with the HYPE framework which was build <span>by Branden</span> Hall and Joshua Davis.<br />
<span id="more-2893"></span> Some of them I would like to show you here:</p>
<p><strong>Object Pool Example</strong></p>
<p><object type="application/x-shockwave-flash" data="http://www.michaelfretz.com/wp-content/uploads/2009/10/HYPEObjectPool.swf" width="580" height="300" class="embedflash"><param name="movie" value="http://www.michaelfretz.com/wp-content/uploads/2009/10/HYPEObjectPool.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p><strong>Sound analyzer.</strong><br />
Press on the Speaker to turn on the sound.</p>
<p><object type="application/x-shockwave-flash" data="http://www.michaelfretz.com/wp-content/uploads/2009/10/HYPEsound.swf" width="580" height="100" class="embedflash"><param name="movie" value="http://www.michaelfretz.com/wp-content/uploads/2009/10/HYPEsound.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p>Music by Ratatat</p>
<p>More information about the HYPE Framework on</p>
<p><a href="http://hype.joshuadavis.com" target="_blank">http://hype.joshuadavis.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/10/13/hype-framework-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to avoid caching of XML-files in Actionscript projects</title>
		<link>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/</link>
		<comments>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 15:28:03 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2796</guid>
		<description><![CDATA[A wile ago I had a problem with external XML files loaded in to my Actionscript project. Some browser always used an older version of my XML and didn&#8217;t reload it every time I reloaded the page. An easy way to avoid this is the following solution: As you can see I added to the [...]]]></description>
			<content:encoded><![CDATA[<p>A wile ago I had a problem with external XML files loaded in to my Actionscript project. Some browser always used an older version of my XML and didn&#8217;t reload it every time I reloaded the page. An easy way to avoid this is the following solution:<br />
<img class="alignnone size-full wp-image-2797" title="avoid caching in xml" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/avoidcachinginxml.png" alt="avoid caching in xml" width="560" height="407" /><br />
As you can see I added to the string of the path a question mark and a random number. Every time the page is reloaded it generates a new path to the XML file. The only changes are behind  the question mark and will not affect the XML file</p>
<p><a href="http://www.michaelfretz.com/wp-content/uploads/2009/08/XMLwithoutCaching_as.zip">Download the XMLwithoutCaching.as File</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Visualization with AS3.0, Tween Lite, MojoFont, PHP 5 and MySQL</title>
		<link>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/</link>
		<comments>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 11:26:33 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Interface Design]]></category>
		<category><![CDATA[mojofont]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tween lite]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2740</guid>
		<description><![CDATA[One of the main reason I use Actionscript 3.0 is to create data visualization. Most times the data is saved in a XML or database. Therefore I would like to show you some parts of of a recently developed program. Here is an example of the final result. (Please open the article to see the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the main reason I use Actionscript 3.0 is to create data visualization. Most times the data is saved in a XML or database. Therefore I would like to show you some parts of of a recently developed program.<br />
Here is an example of the final result.</p>
<p><object type="application/x-shockwave-flash" data="http://www.michaelfretz.com/wp-content/uploads/2009/08/Hagedorn_Organigramm.swf" width="580" height="600" class="embedflash"><param name="movie" value="http://www.michaelfretz.com/wp-content/uploads/2009/08/Hagedorn_Organigramm.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p><span id="more-2740"></span></p>
<p><strong>Font Embedding</strong></p>
<p>Because most time you visualize data you need to write some text to it. If you have done any pure ActionScript projects in Flex or FDT you know this stuff sucks. The resulting code looks like this and it takes hours of googling to get to the right embed parameters/tags.</p>
<p><img class="alignnone size-full wp-image-2742" title="Font embedding" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/fontembeddingoldfashinway.jpg" alt="Font embedding" width="580" height="185" /></p>
<p>But now the way of font handling in Actionscript changed. My colleague Philipp Laeubli created a plugin for eclipse which makes font embedding a piece of cake. If your interested in this, just apply for a private beta account on <a href="http://mojofont.badmojo.ch" target="_blank">mojofont.badmojo.ch</a>.<br />
Here a little example how to embed a font with the mojofont plugin.<br />
<img class="alignnone size-full wp-image-2743" title="Font embedding with mojofont" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/fontembeddingeasyway.png" alt="Font embedding with mojofont" width="425" height="178" /></p>
<p>Instead of writing a whole bunch of metacode and doing some strange font registration, you import your font, and then you can use ist like this: Helvetica.createTextField(). Thats it. All the nasty embedding code and other things are completely handled by the plugin which generates a simple to use and embed swc file.</p>
<p><strong>Tweening</strong><br />
For the hole tweening I used the tweenlite library from <a href="http://blog.greensock.com/tweenliteas3/" target="_blank">http://blog.greensock.com/tweenliteas3/</a>. In my opinion it is one of the best tweening libarys and very easy to use.</p>
<p><strong>XML Loading</strong><br />
I wrote a XMLLoader class. The XMLLoader class loads the hole data of the XML into a String. As soon as its finishes with loading, it dispatches an event. With the getter methods its easy to recive the data and use it afterwards in your programm.</p>
<p><img class="alignnone size-full wp-image-2749" title="xmlloader1" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/xmlloader1.jpg" alt="xmlloader1" width="512" height="554" /></p>
<p><strong>PHP File to generate XML</strong><br />
Many of you will ask why I id use XML. In my opinion its the easiest way of recieving data and its easy to generate it from a database. To generate the XML file I developed a PHP file. This file connects to a MySQL database and loads the whole content of the defined table.  At the moment you will have to define the used fields by hand. First of all, be sure you have all the needed fields in your database. Afterwards change the values in the begin of the mysqlToXML.php file. You have two options. 1: Make the PHP file look like an XML after loading it or 2: let it generate an external file. The first one is the better way if you change often data but dont have to many visitors. The option with the external file is a good option if you want to save database connections because you only ned to generate the XML file once you have changed some data. If you use the external XML file option, be sure that you have the write permission set on your webspace. After you generated your XML just make sure your XML loader class in your Actionscript project knows the path to the file. If you use the other option just add the path of the mysqlToXML.php in your Actionscript project.<br />
<a href="http://www.michaelfretz.com/wp-content/uploads/2009/08/mysqlToXML.zip">Download mysqlToXML.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Superball &#8211; Second Life Spiel</title>
		<link>http://www.michaelfretz.com/2009/08/01/superball-second-life-spiel/</link>
		<comments>http://www.michaelfretz.com/2009/08/01/superball-second-life-spiel/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 09:15:13 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[Interaktion]]></category>
		<category><![CDATA[Second Life]]></category>
		<category><![CDATA[Social Software]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2705</guid>
		<description><![CDATA[Im vierten Semester besuchten wir das Modul &#8220;Design Studio II Interaction in virtual environments&#8221; bei Max Moswitzer. Es galt ein Interaktives Objekt in Second Life zu erstellen. Zusammen mit Jonas Kaufmann und Gabriel Süss haben wir ein kleines Spiel in Second Life programmiert. Unsere Anwendung Superball, ist ein kleines Game in Second Life welches ähnlich [...]]]></description>
			<content:encoded><![CDATA[<p>Im vierten Semester besuchten wir das Modul &#8220;Design Studio II Interaction in virtual environments&#8221; bei Max Moswitzer. Es galt ein Interaktives Objekt in Second Life zu erstellen. Zusammen mit Jonas Kaufmann und Gabriel Süss haben wir ein kleines Spiel in Second Life programmiert. Unsere Anwendung Superball, ist ein kleines Game in Second Life welches ähnlich wie ein Fussballspiel funktioniert.  Im Gegensatz zu einem normalen Fussballspiel ist unser Spielfeld rund und hat leicht abgerundetete Wände. Auch der Ball fliegt nicht immer so wie man dies eigenltich erwartet.</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-2709" title="Second Life Superball Spielfeld 3" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/sl_superball_playground3.jpg" alt="Second Life Superball Spielfeld 3" width="580" height="371" /></p>
<p>Das Spielfeld inkl. Tore:</p>
<p><span id="more-2705"></span></p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-2706" title="Second Life Superball Goal" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/sl_superball_goal.jpg" alt="Second Life Superball Goal" width="580" height="371" /></p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-2707" title="Second Life Superball Spielfeld" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/sl_superball_playground.jpg" alt="Second Life Superball Spielfeld" width="580" height="371" /></p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-2708" title="Second Life Superball Spielfeld 2" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/sl_superball_playground2.jpg" alt="Second Life Superball Spielfeld 2" width="580" height="371" /></p>
<p style="text-align: left;">Wir haben uns von einem klassischen Spielfeld abgelöst und suchten eine neue Idee. Wir haben uns an runde Grundformen gehalten und so unser Spiel konzipiert und umgesetzt. Das Fussballspielfeld ist Rund und auch die beiden Tore sind in dieser runden Form gehalten. Speziell an unseren Toren ist, dass man von beiden Seiten her punkten kann. Die Problematik an unseren Toren ist die Kommunikation mit der Anzeigetafel. Wenn ein Spieler (Avatar) ins Tor Läuft, giebt es auch ein Punkt. Dies konnten wir leider nicht anders lösen.</p>
<p>Die Spielstandanzeige:<br />
Die Anzeige ist das Steuerungsinterface des ganzen Superball-Spiels. Man kann mit den Buttons der Anzeige ein neues Spiel starten und sich einen neuen Ball generieren lassen. Die Anzeigetafel wird von den beiden Toren benachrichtigt, wenn ein Ball ins Tor geschossen wurde. Darauf wird der Spielstand aktualisiert und angezeigt. So sieht man stets, wie das aktuelle Spiel steht.</p>
<p>Der Ball:<br />
Der Ball ist ein physikalisches Objekt. Er reagiert auf die Distanz zu den Spielern. Wenn diese in den Umkreis von einem Meter kommen aktiviert er sich. Drückt man nun $ + Enter oder $$ + Enter oder $$$ + Enter fliegt der Ball davon. Die Flugbahn wird aus der Aktivierungspostion des Avatars und der Position des Balles berechnet. Dies kann zu lustigen Szenen führen wenn dann plötzlich der rollende Ball in eine völlig unerwartete Position fliegt. Das Ziel des Balls ist nicht eine völlig realistische Funktion sondern viel mehr ein möglichst grosser Spassfaktor mit der Unberechenbarkeit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/08/01/superball-second-life-spiel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LichtON &#8211; Lichtsteuerungssoftware</title>
		<link>http://www.michaelfretz.com/2009/02/27/lichton-lichtsteuerungssoftware/</link>
		<comments>http://www.michaelfretz.com/2009/02/27/lichton-lichtsteuerungssoftware/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 15:42:59 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Visualisierung]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/2009/02/27/lichton-lichtsteuerungssoftware/</guid>
		<description><![CDATA[Der Hintergrund Dieses Projekt hat in Zusammenarbeit mit der Nimbus-Group in Stuttgart stattgefunden. Dort befindet sich auch das Nimbus Mock-Up, ein Simulationsbereich, auf welchem auf über 1500m2 die Produkte von Nimbus präsentiert werden. In Zusammenarbeit mit GIRA wurde für das Mock-Up ein Gebäudesteuerungssystem installiert, über welches primär das Licht der gesamten Ausstellungsfläche geregelt werden kann. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Der Hintergrund</strong><br />
Dieses Projekt hat in Zusammenarbeit mit der Nimbus-Group in Stuttgart stattgefunden. Dort befindet sich auch das Nimbus Mock-Up, ein Simulationsbereich, auf welchem auf über 1500m2 die Produkte von Nimbus präsentiert werden. In Zusammenarbeit mit GIRA wurde für das Mock-Up ein Gebäudesteuerungssystem installiert, über welches primär das Licht der gesamten Ausstellungsfläche geregelt werden kann. Diese Steuerung wird mittels eines Touchscreens bedient, welchem unser Interesse galt.<br />
<strong>Das Ziel</strong><br />
Das Ziel des Projekts war die Entwicklung eines Navigationskonzepts und die Gestaltung eines entsprechenden GUI‘s für den Touchscreen. Damit sollte vor allem sämtliches Licht im ganzen Mock-Up gesteuert werden können. Das heisst, vom ganzen Stockwerk über einzelne Räume bis hin zu einzelnen Leuchten sollte die Lichtstimmung detailliert regelbar sein. Optional war auch die Steuerung weiterer Komponenten wie Audioquellen, Jalousien etc. denkbar. Das GUI sollte zudem an das CorporateDesign von Nimbus angepasst werden und sich gut ins Mock-Up einfügen. Und zu guter letzt gilt es auch noch zu erwähnen, dass die beste Arbeit prämiert wurde: für jeden Gewinner gab es eine Nimbus Leuchte &#8220;Line Z&#8221;.<br />
<strong>Projekt</strong><br />
Das Projekt LichtOn baut auf eine simple Bedienung, auf die Einfachheit des An/Aus eines Lichtschalters. Der Fokus unserer Arbeit liegt in der Schlichtheit und Usability des Programms. So zeigt sich beispielsweise der Startscreen auch gern schlicht, mit nichts weiter als einigen wählbaren Voreinstellungen in Form von simplen Buttons, welche mit einem einzigen Klick das ganze Mock-Up auf die gewünschte Helligkeit einstellen.</p>
<p>Die Hauptnavigation befindet sich diskret am unteren Bildschirmrand. Das Konzept sieht ausserdem als wichtigen Punkt vor, dass bei jedem Schritt nur die Interaktionselemente sichtbar sind, welche gerade benutzt werden können oder sonst von Bedeutung sind, indem sie beispielsweise auf etwas hinweisen. So werden die Elemente im Bild auf ein Minimum reduziert und die Übersichtlichkeit und Bedienbarkeit auf ein Maximum angehoben.</p>
<p>Grafisch ist unser Design den von der Firma Nimbus vermittelten sinnlichen Erfahrungen angepasst. Die verschiedenen Elemente sind in ihrer milchglasig/metallischen Erscheinung der Konnotation der beiden meist genutzten Materialien von Nimbus angepasst.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/02/lichton_startscreen.jpg" alt="LichtOn Startscreen" /></p>
<p>Startscreen</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/02/lichton_karteubersicht2.jpg" alt="LichtON Kartenübersicht" /></p>
<p>Kartenübersicht</p>
<p><a title="LichtOn Dokumentation (PDF 2.3MB)" href="http://www.michaelfretz.com/wp-content/uploads/2009/02/lichton-dokumentation.pdf">LichtOn Dokumentation (PDF 2.3MB)</a></p>
<p><a href="http://code.google.com/p/hs08-nimbus/">SourceCode auf Google Code http://code.google.com/p/hs08-nimbus/</a></p>
[See post to watch Flash video]
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/02/27/lichton-lichtsteuerungssoftware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vorlesungsverzeichnis XML AS3</title>
		<link>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/</link>
		<comments>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 15:14:45 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Interaktion]]></category>
		<category><![CDATA[Visualisierung]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/</guid>
		<description><![CDATA[Im Modul: Digitaler Modulbau 3 lernten wir die Grundlagen des XML Handlings. Dazu haben wir das Vorlesungsverzeichnis der Zürcher Hochschule der Künste neu visualisiert. Die Unterschiedlichen XML Dateien werden dynamisch vom Server der ZHdK in das Projekt geladen. Vorlesungsverzeichnis nachdem das Departement XML geladen ist. Übersicht der Module welche in einer Vertiefung angeboten werden. Durch [...]]]></description>
			<content:encoded><![CDATA[<p>Im Modul: Digitaler Modulbau 3 lernten wir die Grundlagen des XML Handlings. Dazu haben wir das Vorlesungsverzeichnis der Zürcher Hochschule der Künste neu visualisiert. Die Unterschiedlichen XML Dateien werden dynamisch vom Server der ZHdK in das Projekt geladen.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview1.png" alt="Vorlesungsverzeichnis XML Visualisierung Übersicht Departemente" /></p>
<p>Vorlesungsverzeichnis nachdem das Departement XML geladen ist.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview3.png" alt="Vorlesungsverzeichnis XML Visualisierung Modulanzeige" /></p>
<p>Übersicht der Module welche in einer Vertiefung angeboten werden. Durch dir Pfeile kann durch die Module durchgeblättert werden.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview4.png" alt="Vorlesungsverzeichnis XML Visualisierung Modul Details" /></p>
<p>Anzeige eines Moduls.</p>
<p>Zur Programmierung:</p>
<p>Die Dokumentklasse fungiert als Viewer und Controller. Alle Elemente werden hier plaziert. Je nach dem was geklickt wird, entscheidet die Dokumentklasse welches XML geladen werden soll.</p>
<p>Die XML Loaderklasse kann jedes beliebige XML laden. Sind die Daten geladen wird ein Dispatch Event ausgeschossen. Über get Methoden werden Name und Daten zurück geliefert.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/xmlloader.jpg" alt="XML Loader" /></p>
<p>Auszug aus der XML Loaderklasse</p>
<p>Die XML Manager Klasse bekommt die Daten aus der XML Loaderklasse. Die erhaltenen Daten werden in einen Array gespeichert und anschliessend wird ein Dispatch Event ausgeschossen.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/xmlmanager.jpg" alt="XML Manager" /></p>
<p>Auszug aus der XML Manager Klasse</p>
<p>URL zur Demo: <a href="http://vorlesungsverzeichnis.michaelfretz.com/">http://vorlesungsverzeichnis.michaelfretz.com </a></p>
<p>Download <a title="Flex Projekt des Vorlesungsverzeichnis" href="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnisvisualisierung.zip">Flex Projekt des Vorlesungsverzeichnis</a> (104 KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Centered Design &#8211; TouchPanel Applikation</title>
		<link>http://www.michaelfretz.com/2009/01/13/user-centered-design-touchpanel-applikation/</link>
		<comments>http://www.michaelfretz.com/2009/01/13/user-centered-design-touchpanel-applikation/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 09:57:36 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[User Centred Design]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/2009/01/13/user-centered-design-touchpanel-applikation/</guid>
		<description><![CDATA[Im Modul User Centered Design haben wir uns mit einer Applikation befasst, welche auf einem Touchscreen installiert ist. Konzept und Idee: Ein Touchscreen für ex libris Filialen zur Vor-Ort-Bestellung von Produkten aus dem Internet: www.exlibris.ch Fokus haben wir bei unserem Prototyp auf die Sparte Musik gelegt &#8211; natürlich wäre es auch denkbar das Touchscreen um [...]]]></description>
			<content:encoded><![CDATA[<p>Im Modul User Centered Design haben wir uns mit einer Applikation befasst, welche auf einem Touchscreen installiert ist.</p>
<p>Konzept und Idee:<br />
Ein Touchscreen für ex libris Filialen zur Vor-Ort-Bestellung von Produkten aus dem Internet: www.exlibris.ch<br />
Fokus haben wir bei unserem Prototyp auf die Sparte Musik gelegt &#8211; natürlich wäre es auch denkbar das Touchscreen um andere Produktkategorien wie Bücher, Videospiele, usw. &#8230; zu erweitern.</p>
<p>Während des ganzen Entwicklungsprozesses haben wir regelmässig Testbenutzer in das Projekt einbezogen.</p>
<p>Zu Beginn haben wir einen Paper-Prototyp entwickelt.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/paperprototyp_exlibris.jpg" alt="Paperprototyp" /></p>
<p>Den Paperprototyp haben wir mit verschiedenen Testbenutzer getestet. Das Feedback haben wir ausgewertet und anschliessend einen Prototyp in PHP und XHTML entwickelt.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/test_prototyp01.jpg" alt="Usertest Prototyp" /></p>
<p>Prototyp Test</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/test_prototyp02.jpg" alt="Usertest Prototyp" /></p>
<p>Prototyp Test</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/website_prototyp.jpg" alt="UCD Website Prototyp" /></p>
<p>Printscreen der Touchscreen Applikation</p>
<p>Im Hintergrund unserer Applikation verwendeten wir das PHP Last.FM API von matto1990.com. Mit Hilfe dieser Applikation konnten wir die Daten von Last.FM abfragen und für unsere Anwendung aufbereiten. Mit Script Aculos<br />
(http://script.aculo.us) verwendeten wir das Javascript Framework welches Hauptsächlich für das Anzeigen der Daten und die Animationen eingesetzt wurde. Auch mit Javascript haben wir eine Tastatur entwickelt, welche auf dem Touchpanel eingesetzt wurde. Da wir eine Art Template verwendet haben konnten in unserer Entwicklungsphase mehrere Designs gleichzeitig auf der Applikation verwenden und diese mit einem JumpMenu einfach<br />
umschalten.<br />
URL zur Demo: <a href="http://ucd.michaelfretz.com">http://ucd.michaelfretz.com</a></p>
<p>Download Dokumentation :<a title="Dokumentation" href="http://www.michaelfretz.com/wp-content/uploads/2009/01/dokumentation_exlibris_kleinstedateigroesse.pdf">Dokumentation</a> (PDF 2.7MB)</p>
<p>Download: <a title="Keynote" href="http://www.michaelfretz.com/wp-content/uploads/2009/01/praesentation_exlibris.zip">Keynote Präsentation</a> (ZIP 2MB)</p>
<p>Team: Christoph Brandin, Liliane Krauss, Michael Fretz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/01/13/user-centered-design-touchpanel-applikation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

