<?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>webfraggle &#187; Adobe Flash Platform</title>
	<atom:link href="http://www.ketzler.de/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ketzler.de</link>
	<description>Christoph Ketzler&#039;s Blog</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:30:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adobe AIR Gyroscope Native Extension with Euler Angles (roll, pitch, yaw) for iOS</title>
		<link>http://www.ketzler.de/2011/11/adobe-air-gyroscope-native-extension-with-euler-angles-roll-pitch-yaw-for-ios/</link>
		<comments>http://www.ketzler.de/2011/11/adobe-air-gyroscope-native-extension-with-euler-angles-roll-pitch-yaw-for-ios/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 14:32:28 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[DeviceMotion]]></category>
		<category><![CDATA[Gyroscope]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[MotionManager]]></category>
		<category><![CDATA[Native Extension]]></category>
		<category><![CDATA[pitch]]></category>
		<category><![CDATA[roll]]></category>
		<category><![CDATA[yaw]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=708</guid>
		<description><![CDATA[I baked my very first AIR iOS Native Extension. It&#8217;s just an adapted version of this version from Adobe. Because in my opinion the data of radians per second aren&#8217;t really good to handle. So I looked into Apples API documentation and found out that there are Euler Angles in the CMMotionManager CMDeviceMotion classes. So [...]]]></description>
			<content:encoded><![CDATA[<p>I baked my very first AIR iOS Native Extension. It&#8217;s just an adapted version of <a href="http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/gyroscope.html">this version from Adobe</a>. Because in my opinion the data of radians per second aren&#8217;t really good to handle. So I looked into Apples API documentation and found out that there are Euler Angles in the CMMotionManager CMDeviceMotion classes. So I just changed a few lines in the Objective-C Code. I learned much from this tutorial <a href="http://www.liquid-photo.com/2011/10/28/native-extension-for-adobe-air-and-ios-101/">Native Extionsion for Adobe AIR and iOS 101 by Liquid Photo</a></p>
<pre class="brush: objc; title: ; notranslate">
NSString *myStr = [NSString stringWithFormat:@&quot;%f&amp;%f&amp;%f&amp;%f&amp;%f&amp;%f&quot;,
rotate.x,
rotate.y,
rotate.z,
motionManager.deviceMotion.attitude.roll,
motionManager.deviceMotion.attitude.pitch,
motionManager.deviceMotion.attitude.yaw];

[motionManager startDeviceMotionUpdates];

motionManager.deviceMotionUpdateInterval = 0;
</pre>
<p>And added these three parameters roll, pitch and yaw to the Actionscript Gyroscope Event.</p>
<pre class="brush: as3; title: ; notranslate">
new GyroscopeEvent(GyroscopeEvent.UPDATE, _x, _y, _z, _roll, _pitch, _yaw)
</pre>
<p>You can download source and final iOS .ane Native Extension file here:<br />
<a href='http://www.ketzler.de/wp-content/uploads/2011/11/iOS-Air-Native-Extension-Gyroscope-with-Euler-Angles.zip'>iOS Air Native Extension Gyroscope &#8211; with Euler Angles</a></p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/11/adobe-air-gyroscope-native-extension-with-euler-angles-roll-pitch-yaw-for-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert PNG to JPEG XR for use in Flash / Flex and AS3</title>
		<link>http://www.ketzler.de/2011/11/convert-png-to-jpeg-xr-for-use-in-flash-flex-and-as3/</link>
		<comments>http://www.ketzler.de/2011/11/convert-png-to-jpeg-xr-for-use-in-flash-flex-and-as3/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 20:42:33 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[JPEG XR]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=702</guid>
		<description><![CDATA[A new feature in Flash Player 11 and Adobe AIR 3 is the feature to use JPEG XR. A enhanced JPEG format. But how to generate or convert JPEG XR files. I found no Photoshop Plugin. All open source tools aren&#8217;t able because of licensing problems. The only tool i found is XN View, which [...]]]></description>
			<content:encoded><![CDATA[<p>A new feature in Flash Player 11 and Adobe AIR 3 is the feature to use <a href="http://en.wikipedia.org/wiki/JPEG_XR">JPEG XR</a>. A enhanced JPEG format. </p>
<p>But how to generate or convert JPEG XR files. I found no Photoshop Plugin. All open source tools aren&#8217;t able because of licensing problems. The only tool i found is XN View, which can convert PNG files including the alpha channel to JPEG XR.</p>
<p>But you have to use the &#8220;<strong>Batch Convert</strong>&#8221; tool. Only there is the option to convert to JPEG XR. </p>
<p>After converting you can load and use the JPEG XR files via Actionscript. e.g. with a Loader or via embedding. It behaves like a PNG file but with much smaller size while keeping very good quality. </p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/11/convert-png-to-jpeg-xr-for-use-in-flash-flex-and-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe AIR 3: How to build a Captive Runtime, Standalone Bundle Executable App</title>
		<link>http://www.ketzler.de/2011/11/adobe-air-3-how-to-build-a-captive-runtime-standalone-bundle-executable-app/</link>
		<comments>http://www.ketzler.de/2011/11/adobe-air-3-how-to-build-a-captive-runtime-standalone-bundle-executable-app/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 20:16:15 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[adt]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[captive runtime]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[standalone]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=697</guid>
		<description><![CDATA[The challenge was to build a Adobe Air 3 Standalone Executable. Also called a &#8220;Captive Runtime&#8221; or a Bundle. Here are some better descriptions: http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html But it was not so easy as it sounds because the order of the adt options are very important! If the order isn&#8217;t correct you get the error &#8220;-storetype is [...]]]></description>
			<content:encoded><![CDATA[<p>The challenge was to build a Adobe Air 3 Standalone Executable. Also called a &#8220;Captive Runtime&#8221; or a Bundle.</p>
<p>Here are some better descriptions:<br />
<a href="http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html">http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html</a></p>
<p>But it was not so easy as it sounds because the <strong>order</strong> of the adt options are <strong>very important</strong>!</p>
<p>If the order isn&#8217;t correct you get the error &#8220;<strong>-storetype is required</strong>&#8220;.</p>
<p>And if you are behind a firewall or no internet connection, the timestamp server isn&#8217;t reachable. So use &#8220;-tsa none&#8221; if you get &#8220;<strong>Could not generate timestamp: Connection timed out: connect</strong>&#8220;. </p>
<p>Here is my ant task which do the job with the correct order. But the order of the options in a terminal command should be the same.</p>
<pre class="brush: xml; title: ; notranslate">&lt;target name=&quot;07. [package exe]&quot;&gt;
	&lt;mkdir dir=&quot;${publish.dir}&quot;/&gt;
	&lt;input message=&quot;certificate password:&quot; addproperty=&quot;certPassword&quot; /&gt;
	&lt;java jar=&quot;${sdk.dir}/${adt}&quot; fork=&quot;true&quot; failonerror=&quot;true&quot; dir=&quot;${deploy.dir}/&quot;&gt;
		&lt;arg value=&quot;-package&quot; /&gt;
		&lt;arg value=&quot;-keystore&quot;/&gt;
		&lt;arg value=&quot;${air.certificate}&quot;/&gt;

		&lt;!-- NATIVE_SIGNING_OPTIONS --&gt;
		&lt;arg value=&quot;-storetype&quot;/&gt;
		&lt;arg value=&quot;pkcs12&quot;/&gt;
		&lt;arg value=&quot;-storepass&quot;/&gt;
		&lt;arg value=&quot;${certPassword}&quot;/&gt;
		&lt;!-- &lt;arg value=&quot;-tsa&quot; /&gt;
		&lt;arg value=&quot;none&quot; /&gt; --&gt;
		&lt;arg value=&quot;-target&quot; /&gt;
		&lt;arg value=&quot;bundle&quot; /&gt;
		&lt;!-- Name Of File To Create--&gt;
		&lt;arg value=&quot;${publish.dir}/${publish.exe}&quot; /&gt;
		&lt;!-- App Descriptor--&gt;
		&lt;arg value=&quot;${application.descriptor}&quot; /&gt;
		&lt;!-- Files To Package --&gt;
		&lt;arg value=&quot;Icon*&quot; /&gt;
		&lt;arg value=&quot;Default*&quot; /&gt;
		&lt;arg value=&quot;iTunesArtwork.png&quot; /&gt;
		&lt;arg value=&quot;-C&quot; /&gt;
		&lt;arg value=&quot;${deploy.dir}/&quot; /&gt;
		&lt;arg value=&quot;${deploy.swf}&quot; /&gt;
	&lt;/java&gt;
&lt;/target&gt;
</pre>
<p>Hope this helps some people having the same problems.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/11/adobe-air-3-how-to-build-a-captive-runtime-standalone-bundle-executable-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fastest way to install debug build on iPhone.</title>
		<link>http://www.ketzler.de/2011/07/fastest-way-to-install-debug-build-on-iphone/</link>
		<comments>http://www.ketzler.de/2011/07/fastest-way-to-install-debug-build-on-iphone/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 15:51:07 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=676</guid>
		<description><![CDATA[If you are developing with an other framework than Xcode, Flash or Appcelerator Titanium it is a long way to get the .ipa file installed on your iPhone. You have to update the .ipa in your iTunes or the iPhone Configuration Utility and than you have to Sync your iPhone again. That needs time an [...]]]></description>
			<content:encoded><![CDATA[<p>If you are developing with an other framework than Xcode, Flash or Appcelerator Titanium it is a long way to get the .ipa file installed on your iPhone. You have to update the .ipa in your iTunes or the iPhone Configuration Utility and than you have to Sync your iPhone again. That needs time an many clicks and drag &#038; drop operations. So  I found a new way. It makes use of the OTA (Over The Air) installation feature of IOS 4 and higher.</p>
<p><strong>Step 1: Configuration</strong></p>
<ol>
<li>Install (If you did not have one installed already) a web server on your local machine. <a href="http://www.mamp.info/">MAMP</a> on Mac or <a href="http://www.apachefriends.org/">XAMPP</a> on Windows</li>
<li>Create a new directory for the OTA files somewhere</li>
<li>Create an alias in your http.conf to that folder<br />
<code>Alias /yourapp "/Users/christoph/Documents/path/to/OTA"</code></li>
<li>Use <a href="http://www.hanchorllc.com/betabuilder-for-ios/">iOS Beta Builder</a> to create the files to the OTA folder</li>
<li>Open Safari on the iPhone type in your local machines ip plus alias e.g.: http//192.168.0.40/yourapp. Click install and OK</li>
</ol>
<p><strong>Step 2: Use it after every build</strong></p>
<p>And everytime you have an update you have only to do these steps (iOS Beta Builder is opened and used one time):</p>
<ol>
<li>Switch to iOS Beta Builder, press &#8220;Generate Deployment Files&#8221;, the folder should be correct, so just &#8220;Choose Directory&#8221;</li>
<li>Switch to Safari, press the install link from the already opened local machines URL</li>
</ol>
<p>For me it&#8217;s time saving.</p>
<p>Any other ideas how to improve the process to get .ipa files installed on the iOS device? Please comment.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/07/fastest-way-to-install-debug-build-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FUG:FD Die Flash User Group Fulda</title>
		<link>http://www.ketzler.de/2011/05/fugfd-die-flash-user-group-fulda/</link>
		<comments>http://www.ketzler.de/2011/05/fugfd-die-flash-user-group-fulda/#comments</comments>
		<pubDate>Sat, 21 May 2011 07:10:50 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Flash Flex actionscript]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/2011/05/fugfd-die-flash-user-group-fulda/</guid>
		<description><![CDATA[Wir haben letzte Woche die Flash User Group Fulda gegr&#252;ndet. http://fb.me/ Wer Lust hat kommt vorbei. Wir freuen uns drauf.]]></description>
			<content:encoded><![CDATA[<p>Wir haben letzte Woche die Flash User Group Fulda gegr&#252;ndet. http://fb.me/ Wer Lust hat kommt vorbei. Wir freuen uns drauf.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/05/fugfd-die-flash-user-group-fulda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ten years after David and me produced the stress&#8217;O&#039;matic game, it&#8217;s available on the iPhone.</title>
		<link>http://www.ketzler.de/2011/05/ten-years-after-david-and-me-produced-the-stressomatic-game-its-available-on-the-iphone/</link>
		<comments>http://www.ketzler.de/2011/05/ten-years-after-david-and-me-produced-the-stressomatic-game-its-available-on-the-iphone/#comments</comments>
		<pubDate>Sun, 08 May 2011 11:35:34 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[AIR 2.6]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[poweredbyflash]]></category>
		<category><![CDATA[stressomatic]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=669</guid>
		<description><![CDATA[2001 we did this game together. David painted the graphics and I programmed the flash part. Some time ago I found this on some backups, ported it to AS3 and AIR2.6 and since yesterday it&#8217;s available on the Apple App Store. Have fun with it, load it from the App Store.]]></description>
			<content:encoded><![CDATA[<p>2001 we did this game together. David painted the graphics and I programmed the flash part. Some time ago I found this on some backups, ported it to AS3 and AIR2.6 and since yesterday it&#8217;s available on the <a href="http://bit.ly/stressomatic">Apple App Store</a>.</p>
<p><a href="http://www.ketzler.de/wp-content/uploads/2011/05/IMG_0603.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/05/IMG_0603.png" alt="" title="IMG_0603" width="480" height="320" class="alignnone size-full wp-image-670" /></a></p>
<p><a href="http://www.ketzler.de/wp-content/uploads/2011/05/IMG_0608.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/05/IMG_0608.png" alt="" title="IMG_0608" width="480" height="320" class="alignnone size-full wp-image-671" /></a></p>
<p><a href="http://bit.ly/stressomatic">Have fun with it, load it from the App Store.</a></p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/05/ten-years-after-david-and-me-produced-the-stressomatic-game-its-available-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update: The Dr&#228;ger Carina Simulation is now available on the iPhone.</title>
		<link>http://www.ketzler.de/2011/02/update-the-draeger-carina-simulation-is-now-available-on-the-iphone/</link>
		<comments>http://www.ketzler.de/2011/02/update-the-draeger-carina-simulation-is-now-available-on-the-iphone/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 17:20:24 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=655</guid>
		<description><![CDATA[Last week Apple reviewed the Dr&#228;ger Carina Trainer Simulation App. This App was first developed with Adobe Flash for the Desktop. And then was a little bit changed to fit on the smaller screen, but the codebase is the same. At some places I needed to do some optimization because of the lower processor power, [...]]]></description>
			<content:encoded><![CDATA[<p>Last week Apple reviewed the <a href="http://itunes.apple.com/de/app/carinatrainer/id418538909?mt=8">Dr&#228;ger Carina Trainer Simulation</a> App. This App was first developed with Adobe Flash for the Desktop. And then was a little bit changed to fit on the smaller screen, but the codebase is the same. At some places I needed to do some optimization because of the lower processor power, but now it works fine and was published with the <a href="http://labs.adobe.com/technologies/packagerforiphone/">Adobe Packager for iPhone</a>.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/02/update-the-draeger-carina-simulation-is-now-available-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gas flow simulation through tubes with stardust particle engine</title>
		<link>http://www.ketzler.de/2011/01/gas-flow-simulation-through-tubes-with-stardust-particle-engine/</link>
		<comments>http://www.ketzler.de/2011/01/gas-flow-simulation-through-tubes-with-stardust-particle-engine/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 14:00:03 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[BitmapField]]></category>
		<category><![CDATA[particle Engine]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[pipe]]></category>
		<category><![CDATA[pipes]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[stardust]]></category>
		<category><![CDATA[tubes]]></category>
		<category><![CDATA[VelocityField]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=388</guid>
		<description><![CDATA[The Challenge: Simulate the flow through the tubes in a medical device. The device is a anesthesia workstation where three different gases are mixed. The device has two main working modes, manual ventilation and controlled ventilation. We had to find a solution to show the flow between the parts in different situations in a very [...]]]></description>
			<content:encoded><![CDATA[<p>The Challenge: Simulate the flow through the tubes in a medical device. The device is a  anesthesia workstation where three different gases are mixed. The device has two main working modes, manual ventilation and controlled ventilation. We had to find a solution to show the flow between the parts in different situations in a very understandable way. We designed a schematic version of the devices&#8217; tubes. And now it was my part to simulate the gas through the tubes.<br />
<span id="more-388"></span><br />
<strong>Final result should look like this:</strong><br />
<br /><img src="http://www.ketzler.de/wp-content/uploads/2020/08/flow-1stframe.jpg" width="" height="" alt="media" /><br />
</p>
<p><strong>The Options</strong><br />
I had tow options, first to fake it on the timeline or second, do it with a particle engine. I found two open source particle engines for Flash: <a href="http://flintparticles.org/">flint</a> and <a href="http://code.google.com/p/stardust-particle-engine/">stardust</a>.</p>
<p>I decided to use stardust because of the nice <a href="http://stardust-particle-engine.googlecode.com/svn/trunk/examples/2D/Waypoints/Waypoints.html">demo of the pixel renderer with the waypoints</a>.</p>
<p><strong>Experiments</strong><br />
I thought the 2D Waypoint are exactly what I need. But the tests showed that the particles moved much more randomly than it is good for a device used in clinical environment <img src='http://www.ketzler.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>Next I tried the stardust&#8217;s box border feature. But there was also to much random and the particle flow out of the system.</p>
<p>Finally I used the BitmapField with a VelocityField feature to block the particles inside the tubes. </p>
<p><strong>Implementation</strong><br />
Here&#8217;s a little explanation how I did it.</p>
<p>As an example I show only this part of the tubes:<br />
<a href="http://www.ketzler.de/wp-content/uploads/2010/07/flow-map-obenrum-tubes.jpg"><img src="http://www.ketzler.de/wp-content/uploads/2010/07/flow-map-obenrum-tubes.jpg" alt="" title="flow-map-obenrum-tubes" width="434" height="197" class="alignnone size-full wp-image-501" /></a></p>
<p>I painted a colormap like this:<br />
<img src="http://www.ketzler.de/wp-content/uploads/2010/07/flow-map-obenrum-color-map.jpg" alt="" title="flow-map-obenrum-color-map" width="434" height="197" class="alignnone size-full wp-image-499" /></p>
<p><img src="http://www.ketzler.de/wp-content/uploads/2010/07/flow-map-obenrum-overlay.jpg" alt="" title="flow-map-obenrum-color-map" width="434" height="197" class="alignnone size-full wp-image-499" /></p>
<p>Maybe it&#8217;s better to understand with little arrows showing the moving vector if a particle reaches a color area.<br />
<img src="http://www.ketzler.de/wp-content/uploads/2010/07/flow-map-obenrum-arrows.jpg" alt="" title="flow-map-obenrum-overlay" width="434" height="197" class="alignnone size-full wp-image-500" /></p>
<p>So how it works. Every time a particle moves over the color-map it analyses the color of the current position and moves that way. The motion vector is changed. This velocity vector is generated out of the Red and Green Channel of the Bitmap. RGB Colors have values between 0 and 255. But here values between minus and plus something are needed. The engine converts 0-255 to -128 to 128 values. In this graphic you can see the red and green values for all 45° vectors.<br />
<a href="http://www.ketzler.de/wp-content/uploads/2009/08/coords.gif"><img src="http://www.ketzler.de/wp-content/uploads/2009/08/coords.gif" alt="" title="coords" width="582" height="582" class="alignnone size-full wp-image-643" /></a><br />
I have distributed some emitters and death zones over the tube system. So that a particle never moves through the whole system. A particel starts, moves to his next death zone and there a listener decides what to do with this died particle. e.g. let it start on a next emitter or let the bag or lung grow and so on.</p>
<p><strong>Code</strong><br />
And here is some code:<br />
Every particle needs the following:<br />
<code>// Start and Death Zones<br />
protected var startZone:CircleZone = new CircleZone();<br />
protected var deathZone:CircleZone = new CircleZone();<br />
// The Color Map<br />
protected var bmpField:BitmapField = new BitmapField();<br />
// Bitmapdata of the Color Map<br />
protected var bmp:BitmapData = new BitmapData(654,524);<br />
// A mover<br />
protected var myMove : Move = new Move();<br />
private var tempIter : ParticleIterator;<br />
</code></p>
<p>The bitmapfield is massless:<br />
<code>bmpField.massless = true;</code></p>
<p>And has a maximum moving of 4 pixels:<br />
<code>bmpField.max = 4;</code></p>
<p>After you have filled the bitmap with data update the color map:<br />
<code>// this comes out of a swc asset file but you can also use embedded or downloaded bmps<br />
bmp.draw(new AssetFlowMapFreshGas());<br />
bmpField.update(bmp);</code></p>
<p>The Emitter needs the following actions and initializers:<br />
<code>addInitializer(new Position(startZone));<br />
addAction(new DeathZone(deathZone));<br />
// some moving<br />
myMove.multiplier = 1;<br />
addAction(myMove);<br />
// AND HERE the velocity changed by the painted flow-map<br />
var velField:VelocityField = new VelocityField();<br />
velField.field = bmpField;<br />
addAction(velField);<br />
// a little bit random<br />
var rf:RandomDrift = new RandomDrift(1, 1);<br />
rf.massless = true;<br />
rf.priority = -3; //lower than -2<br />
addAction(rf);<br />
// my own color initalizer because of the three different gas colors<br />
addInitializer(new RandomColorInitializer());</code></p>
<p>The final simulation isn&#8217;t ready yet but it can be found later this year on the Dr&#228;ger homepage under Fabius GS premium.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/01/gas-flow-simulation-through-tubes-with-stardust-particle-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resign an iPhone App, insert new Bundle ID and send to Xcode Organizer for Upload</title>
		<link>http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/</link>
		<comments>http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 12:01:47 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[codesign]]></category>
		<category><![CDATA[ipa]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[organizer]]></category>
		<category><![CDATA[packager for iphone]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[provisioning]]></category>
		<category><![CDATA[resign]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=587</guid>
		<description><![CDATA[The challenge: Create a Flash App, pack it with the Packager for iPhone with my certificate and provisioning profiles, send it to the client that he can resign it with his informations and import it into Xcode Organizer for validating and uploading to the App Store. I did some research and found out that all [...]]]></description>
			<content:encoded><![CDATA[<p>The challenge: Create a Flash App, pack it with the Packager for iPhone with my certificate and provisioning profiles, send it to the client that he can resign it with his informations and import it into Xcode Organizer for validating and uploading to the App Store.<br />
<span id="more-587"></span><br />
I did some research and found out that all signing processes in Xcode (while building or resigning in Organizer) is done with a tool called codesign. This tool can also be used via Terminal. I tried it with my Flash .ipa and the included .app. It worked.</p>
<p>But because it is difficult always to use the terminal with more lines long commands I decided to develop a little AIR tool using the new NativeProcess API.<br />
<br/><br/><br />
And here is how it works:<br />
<br/><br/><br />
<strong>1. Select the .ipa.</strong><br />
<a href="http://www.ketzler.de/wp-content/uploads/2011/01/02.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/01/02-300x232.png" alt="" title="02" width="300" height="232" class="alignnone size-medium wp-image-591" /></a><br />
<strong>What is executed:</strong><br />
Old files in this directory are deleted.<br />
The .ipa will be unzipped.<br />
<code>unzip -o /path/to/YourApp.ipa -d /path/to</code><br />
Find the first .app file inside /Payload.<br />
Load the Info.plist file.<br />
Use the CFBundleExecutable as the binary filename.<br />
<br/><br/><br />
The current Signing Authority is read and the entitlements were extracted. The entitlements are needed, because without them the Xcode Organizer can&#8217;t sign the app with a new Provisioning Certificate.<br />
<code>codesign -d -vv --entitlements "/path/to/entitlements" /path/to/Payload/YourApp.app/YourApp</code><br />
<br/><br/><br />
<strong>2. Sign it with a new Signing Authority.</strong><br />
Enter your new Signing Authority. The correct String can be copy&#038;pasted via your keychain.<br />
<a href="http://www.ketzler.de/wp-content/uploads/2011/01/04.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/01/04-300x232.png" alt="" title="04" width="300" height="232" class="alignnone size-medium wp-image-594" /></a><br />
<a href="http://www.ketzler.de/wp-content/uploads/2011/01/keychain.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/01/keychain-300x236.png" alt="" title="keychain" width="300" height="236" class="alignnone size-medium wp-image-595" /></a><br />
<br/><br/><br />
<strong>3. Enter new Bundle Identifier (App ID Suffix)</strong><br />
This must match with your App ID created in the Apple Developer Provisioning Portal.<br />
<a href="http://www.ketzler.de/wp-content/uploads/2011/01/05.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/01/05-300x232.png" alt="" title="05" width="300" height="232" class="alignnone size-medium wp-image-596" /></a><br />
<br/><br/><br />
<strong>4. Resign App and change App ID.</strong><br />
The binary will be resigned with your new informations.<br />
<strong>What is executed:</strong><br />
First, codesign with your extracted entitlements:<br />
<code>codesign -f -s "New Signing Authority" -i "new.bundle.id" --entitlements "/path/to/entitlements" -vv /path/to/Payload/YourApp.app/YourApp</code><br />
Second, change the the Bundle Identifier also inside the Info.plist file.<br />
<br/><br/><br />
<strong>5. Send it to Xcode Organizer for validating and uploading</strong><br />
After clicking the button open Xcode and go to Window > Organizer<br />
<a href="http://www.ketzler.de/wp-content/uploads/2011/01/041.png"><img src="http://www.ketzler.de/wp-content/uploads/2011/01/041-300x215.png" alt="" title="04" width="300" height="215" class="alignnone size-medium wp-image-597" /></a></p>
<p><strong>How does this work:</strong><br />
This was a little bit tricky and needed much research how the Organizer wants the Apps.<br />
Every Archived Build is moved to /UserDir/Library/MobileDevice/Archived Applications/UUID.<br />
So first a UUID is generated an a directory with it is created.<br />
e.g. /UserDir/Library/MobileDevice/Archived Applications/8D3E5DF2-F079-4A3B-460D-5525A6C5472B</p>
<p>Then the .app file is copied to that location. But the Orgnanizer needs an ArchiveInfo.plist file with correct informations in it. </p>
<p>My tool uses a standard template and changes all needed information, so that they are matching the informations in your .apps Info.plist file. These are CFBundleIdentifier, CFBundleDisplayName, CFBundleVersion, MinimumOSVersion, DTPlatformVersion, DTSDKName, CFBundleExecutable, CFBundleDisplayName.<br />
Some other data needs to be generated out of other information. e.g. the UUID of the directory or the Archivedate.<br />
Apple counts dates from 01.01.2001 &#8211; 00:00:00. Surprising.<br />
<br/><br/><br />
That&#8217;s it.<br />
<br/><br/><br />
At the moment this works only with Flash iPhone Apps. I tried it quickly with another .ipa but it fails. I did no investigation in it because at the moment I didn&#8217;t need it.<br />
<br/><br/><br />
<strong>Tip:</strong><br />
Xcode Organizer fails silent. But you can look at the Terminal messages of codesign in your Console Log (Konsole in german). Maybe there you can find why validating or uploading fails.</p>
<p><strong>Downloads:</strong><br />
<a href='http://www.ketzler.de/wp-content/uploads/2011/01/iOSSendToOrganizer.dmg'>iOSSendToOrganizer.dmg Installer</a></p>
<p><strong>Source:</strong><br />
If you make changes or enhancements please share them with me<br />
<a href='http://www.ketzler.de/wp-content/uploads/2011/01/iOSSendToOrganizer.fxp'>iOSSendToOrganizer Source</a></p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AS3 FLVPlayback smoothing the scaling.</title>
		<link>http://www.ketzler.de/2010/07/as3-flvplayback-smoothing-the-scaling/</link>
		<comments>http://www.ketzler.de/2010/07/as3-flvplayback-smoothing-the-scaling/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 10:33:35 +0000</pubDate>
		<dc:creator>webfraggle</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[FLVPlayback]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[smooth]]></category>
		<category><![CDATA[smoothing]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ketzler.de/?p=552</guid>
		<description><![CDATA[I searched a little while, found only AS2 workarounds, but here is the AS3 version of interpolated, smooth video scaling of a FLVPlayback. //playback is your FLVplayback instance playback.getVideoPlayer(playback.activeVideoPlayerIndex).smoothing = true; I use it after the ready event was send.]]></description>
			<content:encoded><![CDATA[<p>I searched a little while, found only AS2 workarounds, but here is the AS3 version of interpolated, smooth video scaling of a FLVPlayback.</p>
<p><code>//playback is your FLVplayback instance<br />
playback.getVideoPlayer(playback.activeVideoPlayerIndex).smoothing = true;</code></p>
<p>I use it after the ready event was send.</p>
<p>]]></content:encoded>
			<wfw:commentRss>http://www.ketzler.de/2010/07/as3-flvplayback-smoothing-the-scaling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

