<?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>Johannes Luderschmidt&#039;s Blog &#187; Actionscript</title>
	<atom:link href="http://johannesluderschmidt.de/lang/en-us/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://johannesluderschmidt.de</link>
	<description>This is a blog about topics like multi-touch, Flash programming and natural user interfaces.</description>
	<lastBuildDate>Tue, 10 Jan 2012 15:54:58 +0000</lastBuildDate>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>Recognize DisplayObject Transform Matrix Change Event in Flash AS3</title>
		<link>http://johannesluderschmidt.de/lang/en-us/recognize-displayobject-transform-matrix-change-event-in-flash-as3/1134</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/recognize-displayobject-transform-matrix-change-event-in-flash-as3/1134#comments</comments>
		<pubDate>Fri, 20 May 2011 12:12:10 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=1134</guid>
		<description><![CDATA[If another object changes the transformation matrix of a DisplayObject, the DisplayObject has no means to recognize that it has been transformed, as it is transformed automatically. E.g., there is no kind of TRANSFORMATION_MATRIX_CHANGED event that is dispatched on the DisplayObject. If your DisplayObject still should react on a change of its transformation matrix, a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://johannesluderschmidt.de/wp-content/uploads/2011/05/Flash-BuilderSchnappschuss004.png" alt="" title="Flash Builder Code" width="450" height="100" class="aligncenter size-full wp-image-1151" /></p>
<p>If another object changes the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/geom/Transform.html#matrix">transformation matrix</a> of a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html">DisplayObject</a>, the DisplayObject has no means to recognize that it has been transformed, as it is transformed automatically. E.g., there is no kind of TRANSFORMATION_MATRIX_CHANGED event that is dispatched on the DisplayObject. If your DisplayObject still should react on a change of its transformation matrix, a workaround is necessary, which is described in the following approach. I show a short solution at first and will explain the actual problem and solution approach in more detail afterwards.<br />
<span id="more-1134"></span><br />
DISCLAIMER: I found no solution where the change of the transformation matrix can be recognized without changing the object that actually does the matrix transformation. If you know or find one, be so kind to post it in the comments.</p>
<p><strong>Short Solution:</strong></p>
<p>Your DisplayObject called <em>UpdateDetectionSprite</em>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> UpdateDetectionSprite <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">transform</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Transform</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span> = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #009900; font-style: italic;">//…</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Object that does the matrix transformation called <em>ActionObject</em>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ActionObject<span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> performTransformation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> transformedSprite<span style="color: #000066; font-weight: bold;">:</span>UpdateDetectionSprite = <span style="color: #0033ff; font-weight: bold;">new</span> UpdateDetectionSprite<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Transform</span> = transformedSprite<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">;</span> 
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span> = <span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//do something with matrix, e.g., move object by translation</span>
	<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">translate</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//assign matrix to Transform object</span>
	<span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">matrix</span> = <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #009900; font-style: italic;">//assign changed transform object to your DisplayObject. your overriden </span>
	<span style="color: #009900; font-style: italic;">//setter will be called, causing the update flag to be set.</span>
	transformedSprite<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span> = <span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>Actual Problem:</strong><br />
I have a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Sprite.html">Sprite</a> (called UpdateDetectionSprite) in which I want to be informed, when the object has been transformed (moved, rotated or scaled). To establish that, one part of the approach is to override the appropriate setters for <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#x">x</a>, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#x">y</a>, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#width">width</a>, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#height">height</a>, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#scaleX">scaleX</a>, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#scaleY">scaleY</a> and <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#rotation">rotation</a> in UpdateDetectionSprite. However, if the UpdateDetectionSprite is modified when its transformation matrix is changed, the mentioned setters will NOT be called, so UpdateDetectionSprite will not be informed on a matrix change, it will automatically transformed. My first idea was to override the setter for the matrix in order to react on the assignment of matrix to UpdateDetectionSprite, but the matrix itself actually is not a property of DisplayObject but a property of DisplayObject&#8217;s <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#transform">transform property</a>. So I overrode the transform setter in UpdateDetectionSprite. In order to inform UpdateDetectionSprite that its matrix has been changed, you additionally have to set the transform property in ActionObject that does the transformation (see listing 2). That approach works as well with UpdateDetectionSprite as with each other DisplayObject.</p>
<p>Complete UpdateDetectionSprite:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> UpdateDetectionSprite <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _updated<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">transform</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Transform</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span> = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">x</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">y</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">rotation</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">rotation</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">rotation</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span> = <span style="color: #004993;">rotation</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">width</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">width</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">height</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = <span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">scaleX</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">scaleX</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleX</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">scaleX</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleX</span> = <span style="color: #004993;">scaleX</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> override <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">scaleY</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">scaleY</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleY</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #004993;">scaleY</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>updated = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleY</span> = <span style="color: #004993;">scaleY</span><span style="color: #000066; font-weight: bold;">;</span>	
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> updated<span style="color: #000000;">&#40;</span>updated<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>updated<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>EXIT_FRAME<span style="color: #000066; font-weight: bold;">,</span> updatedSprite<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>_updated = updated<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> updatedSprite<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">//do something</span>
	<span style="color: #009900; font-style: italic;">//...</span>
	<span style="color: #009900; font-style: italic;">//...</span>
	updated = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>EXIT_FRAME<span style="color: #000066; font-weight: bold;">,</span> updatedSprite<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>For testing purposes, I additionally tried to write a custom <em>Transform</em> object called UpdateDetectionTransform that inherits from <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/geom/Transform.html">Transform</a>, assign it to UpdateDetectionSprite&#8217;s transformation property and override the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/geom/Transform.html#matrix">matrix setter</a> in UpdateDetectionTransform. I do not know why, but it is not possible to assign a custom Transform object to the transform property. This code</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span> = <span style="color: #0033ff; font-weight: bold;">new</span> UpdateDetectionTransform<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>will print &#8216;[object Transform]&#8216; to the console. This means that the assignment of UpdateDetectionTransform to this.transform does not work. I do not know why. If you know why, post it in the comments please.</p>
<p>Alternatively to my outlined approach above, you could dispatch a custom event in ActionObject on UpdateDetectionTransform.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/recognize-displayobject-transform-matrix-change-event-in-flash-as3/1134/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove &#8216;View Source&#8217; from Adobe Air Debug Context Menu in Flash Builder</title>
		<link>http://johannesluderschmidt.de/lang/en-us/remove-view-source-from-adobe-air-debug-context-menu-in-flash-builder/1033</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/remove-view-source-from-adobe-air-debug-context-menu-in-flash-builder/1033#comments</comments>
		<pubDate>Mon, 11 Oct 2010 14:39:15 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=1033</guid>
		<description><![CDATA[Recently I wondered how I can get rid of that &#8220;View Source&#8221; entry in the context menu of Adobe Air as I wanted to add my own context menu there. It turned out that I had to remove all the source folder entries in the project&#8217;s run configuration (see in the image above).]]></description>
			<content:encoded><![CDATA[<p><img src="http://johannesluderschmidt.de/wp-content/uploads/2010/11/Flash-BuilderSchnappschuss003-450x347.png" alt="" title="Flash BuilderSchnappschuss003" width="450" height="347" class="aligncenter size-medium wp-image-1034" /></p>
<p>Recently I wondered how I can get rid of that &#8220;View Source&#8221; entry in the context menu of Adobe Air as I wanted to add my own context menu there.</p>
<p>It turned out that I had to remove all the source folder entries in the project&#8217;s run configuration (see in the image above).</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/remove-view-source-from-adobe-air-debug-context-menu-in-flash-builder/1033/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air 2 Beta 2 VerifyError: Error #1014 (under Mac OS X and Win XP)</title>
		<link>http://johannesluderschmidt.de/lang/en-us/adobe-air-2-beta-2-verifyerror-error-1014-under-mac-os-x-and-win-xp/981</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/adobe-air-2-beta-2-verifyerror-error-1014-under-mac-os-x-and-win-xp/981#comments</comments>
		<pubDate>Tue, 16 Feb 2010 14:12:47 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[tuio]]></category>
		<category><![CDATA[air2]]></category>
		<category><![CDATA[air2beta]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=981</guid>
		<description><![CDATA[Recently, I made my first steps in Adobe Air 2. As Air 2 is still in Beta version (currently in Beta 2, which was released on February 2, 2010) there still could be some problems when working with it. As I work with Flex Builder 3 I downloaded and configured Air 2 with Flex SDK [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I made my first steps in Adobe Air 2. As Air 2 is still in Beta version (currently in Beta 2, which was released on February 2, 2010) there still could be some problems when working with it. </p>
<p><img src="http://johannesluderschmidt.de/wp-content/uploads/2010/02/SafariSchnappschuss025.png" alt="" title="SafariSchnappschuss025" width="450" height="100" class="aligncenter size-full wp-image-982" /></p>
<p><span id="more-981"></span><br />
As I work with Flex Builder 3 I downloaded and <a href="http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes#How_to_overlay_the_Adobe_AIR_SDK_for_use_with_the_Flex_SDK">configured Air 2 with Flex SDK 3.4 accordingly to Adobe&#8217;s manual</a> and everything worked and compiled nicely as well on Mac OS X as on Windows XP (yes, I tried both). </p>
<p>I tried to use UDP datagram sockets within my app (in order to get a direct <a href="http://www.tuio.org/">TUIO</a> connection via OSC/UDP), <a href="http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes#Features_added_in_AIR_2__beta_1">which are supported by Adobe Air beginning with Air 2</a>. However, whenever I tried to start my compiled Air app in Flex Builder with the adl from Adobe Air 2 I got this error message:<br />
<em>VerifyError: Error #1014: Class flash.net::DatagramSocket could not be found.</em> (with the additional stack trace).</p>
<p>I got rid of that message under Windows XP by following <a href="http://labs.adobe.com/wiki/index.php/AIR_2:Developer_FAQ#How_do_I_take_advantage_of_the_new_capabilities_in_the_AIR_2_beta.3F">the hint by Adobe that the namespace in the app descriptor from Air has to be changed to Adobe Air 2 beta 2&#8242;s</a>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/application/2.0beta2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></td></tr></table></div>

<p>Now, my UDP datagram sockets work nicely under Windows XP. However, if I configure everthing accordingly under Mac OS X matters get worse. The app crashes and I get a native error stacktrace from the adl player.</p>
<p>In my opinion the implementation of the adl under Mac OS X is buggy, which is quite normal for a beta release. Thus, I filed an error message at Adobe&#8217;s website.</p>
<p>However, if you try to do the same and you get things working on Mac OS X it would be nice if you dropped me a comment.</p>
<p>By the way: I tried to use <a href="http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes#Features_added_in_AIR_2__beta_1">the new Touch functionality in Adobe Air 2 under Windows 7</a> with a HP Touchsmart and it works quite well (except there are no gestures supported as Windows 7 proposes them). Maybe, I find the time to write a follow-up article on this&#8230;</p>
<p><strong>Update:</strong> It seems like the problem is not connected with Mac OS X but with my version of Flex Builder 3. I moved ahead to Flash Builder 4 beta 2 and now all the Adobe Air 2 beta 2 functionality works.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/adobe-air-2-beta-2-verifyerror-error-1014-under-mac-os-x-and-win-xp/981/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Does Not Find Resource Bundles</title>
		<link>http://johannesluderschmidt.de/lang/en-us/flex-does-not-find-resource-bundles/909</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/flex-does-not-find-resource-bundles/909#comments</comments>
		<pubDate>Wed, 11 Nov 2009 18:36:33 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=909</guid>
		<description><![CDATA[Recently I had the problem that my Flex code, which used the ResourceManager, would not find the resource bundle, which contained all resources for my application. However, the application compiled but it would always crash whenever the first time a resource should be loaded. I checked my compiler arguments a 1000 times but everything was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://johannesluderschmidt.de/wp-content/uploads/2009/11/LocalizationProblem.png"><img src="http://johannesluderschmidt.de/wp-content/uploads/2009/11/LocalizationProblem.png" alt="LocalizationProblem" title="LocalizationProblem" width="450" height="200" class="aligncenter size-full wp-image-918" /></a></p>
<p>Recently I had the problem that my Flex code, which used the ResourceManager, would not find the resource bundle, which contained all resources for my application. However, the application compiled but it would always crash whenever the first time a resource should be loaded. I checked my compiler arguments a 1000 times but everything was correct and did work well in another Flex application. The problem was that my resource bundle was not present in the ResourceManager, it just did not load it.<br />
<span id="more-909"></span><br />
My application did not have any UI elements just a visualization UIComponent that I wrote myself. Thus, I did not load any resources from my MXML. A some point I added a UI element (a Button) and tried to load a resource directly from that  Button in order to see if it worked there:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Button label=<span style="color: #990000;">&quot;@Resource(bundle='myResources', key='OBJECT')&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span></pre></td></tr></table></div>

<p>And it worked fine in that Button and suddenly in the whole application as well. So it seemed to me that Flex refused to load the resource bundle if it was not referenced from the MXML. As I did not want to use an UI element in my application I looked for a workaround and stumbled upon this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Metadata<span style="color: #000066; font-weight: bold;">&gt;</span>
        <span style="color: #000000;">&#91;</span>ResourceBundle<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myResources&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Metadata<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>This piece of MXML code just needs to be added in the top of your Application or WindowedApplication in order to trigger the loading of the resource bundle.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/flex-does-not-find-resource-bundles/909/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNFOCUS – FOCUS</title>
		<link>http://johannesluderschmidt.de/lang/en-us/unfocus-%e2%80%93-focus/718</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/unfocus-%e2%80%93-focus/718#comments</comments>
		<pubDate>Tue, 15 Sep 2009 21:47:04 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Multi-Touch]]></category>
		<category><![CDATA[Success Stories]]></category>
		<category><![CDATA[Tangible Interfaces]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[fiducialtuioas3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[hitachi]]></category>
		<category><![CDATA[ps3eye]]></category>
		<category><![CDATA[reactivision]]></category>
		<category><![CDATA[splitcam]]></category>
		<category><![CDATA[tbeta]]></category>
		<category><![CDATA[tui]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=718</guid>
		<description><![CDATA[I am going to present a few projects on my blog in which I collaborated in one or the other way. The project UNFOCUS – FOCUS is a multi-touch and TUI project that makes use of our fiducialtuioas3 classes. What is UNFOCUS – FOCUS about? How can we know what we do not see? UNFOCUS [...]]]></description>
			<content:encoded><![CDATA[<p><em>I am going to present a few projects on my blog in which I collaborated in one or the other way. The project <a href="http://unfocus-focus.info/">UNFOCUS – FOCUS</a> is a multi-touch and TUI project that makes use of <a href="http://johannesluderschmidt.de/lang/en-us/tuio-actionscript-3-open-source-fiducial-object-interaction-implementation/552">our fiducialtuioas3 classes</a>.</em></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0048_450.jpg" alt="UNFOCUS - FOCUS interface" /></p>
<p><strong>What is UNFOCUS – FOCUS about?</strong><br />
How can we know what we do not see?<br />
<span id="more-718"></span><br />
UNFOCUS – FOCUS is an interactive exhibition concept that tackles the filtering of media content. The focus of the work is a multi-touch table, which allows for the intuitive exploration of digital data with multi-touch.<br />
Country specific picture worlds are being compared via Google search results. Known and unknown can be seen within different results. Multiple users can discuss possible reasons for this by exchanging their knowledge.</p>
<p>UNFOCUS – FOCUS is a multi-media multi-touch and fiducial application based on Flash. It has been created at the <a href="http://www.ba-ravensburg.de/index.php?id=543">University of Cooperative Education Ravensburg</a> as a Bachelor thesis&#8217; work by <a href="http://typo3-design.com">Johannes Scherg</a> and Farina Krause.</p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0022_450.jpg" alt="UNFOCUS - FOCUS interface" /></p>
<p><strong>How has UNFOCUS – FOCUS been implemented?</strong></p>
<p>Hardware components:</p>
<ul>
<li>Hitachi CP-X5 Projector with B&#038;W Anti Infrarot Lowpass filter</li>
<li>Sony PS3 Eye Webcam</li>
<li>DI-Setup with 8x 45 850nm IR LEDs</li>
<li>Gerriets Optitrans back-projection foil</li>
</ul>
<p>Software components:</p>
<ul>
<li>tBeta 1.1</li>
<li>reacTIVision 1.4</li>
<li>SplitCam</li>
<li>Adobe Flash</li>
</ul>
<p>Flash frameworks:</p>
<ul>
<li>FiducialTUIOAS3</li>
<li>Touchlib AS3-Klassen</li>
<li>AS3CoreLib</li>
<li>CustomEvent</li>
</ul>
<p>A short video of UNFOCUS &#8211; FOCUS:</p>
<p><object width="450" height="338"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6740521&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6740521&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="450" height="338"></embed></object>
<p><a href="http://vimeo.com/6740521">UNFOCUS FOCUS &#8211; Appetizer</a> from <a href="http://vimeo.com/user1509498">Johannes Scherg</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Some more pictures:</p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0024_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0030_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0033_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0040_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0049_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0053_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0054_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
<p><img src="http://www.cs.hs-rm.de/~luderschmidt/embed/images/PICT0058_450.jpg" alt="UNFOCUS – FOCUS Interface" /></p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/unfocus-%e2%80%93-focus/718/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fiducialtuioas3 Now Supports Pure TCP TUIO Messages</title>
		<link>http://johannesluderschmidt.de/lang/en-us/fiducialtuioas3-now-supports-pure-tcp-tuio-messages/680</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/fiducialtuioas3-now-supports-pure-tcp-tuio-messages/680#comments</comments>
		<pubDate>Thu, 13 Aug 2009 14:17:00 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Multi-Touch]]></category>
		<category><![CDATA[Tangible Interfaces]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=680</guid>
		<description><![CDATA[fiducialtuioas3 now supports pure TUIO messages via TCP. The bridge TUIO → Flosc → Flash is now being replaced by the bridge TUIO → udp-tcp-bridge → Flash. The latter method renders the transformation of TUIO messages to a proprietary XML dialect obsolete. That speeds up the connection of the TUIO producer (e.g. Touchlib, CCV or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://johannesluderschmidt.de/lang/en-us/tuio-actionscript-3-open-source-fiducial-object-interaction-implementation/552">fiducialtuioas3</a> now supports pure TUIO messages via TCP. </p>
<p><a href="http://johannesluderschmidt.de/wp-content/uploads/2009/08/TCPSupport.png"><img src="http://johannesluderschmidt.de/wp-content/uploads/2009/08/TCPSupport.png" alt="TCPSupport" title="TCPSupport" width="450" height="45" class="aligncenter size-full wp-image-685" /></a></p>
<p>The bridge TUIO → Flosc → Flash is now being replaced by the bridge TUIO → udp-tcp-bridge → Flash. The latter method renders the transformation of TUIO messages to a proprietary XML dialect obsolete. That speeds up the connection of the TUIO producer (e.g. <a href="http://www.nuigroup.com/touchlib/">Touchlib</a>, <a href="http://ccv.nuigroup.com/">CCV</a> or <a href="http://johannesluderschmidt.de/lang/en-us/mac-os-x-multi-touch-tracking-software-touche/233/">Touché</a>) to the Flash application itself (e.g. <a href="http://johannesluderschmidt.de/lang/en-us/vispol-multi-touch-video/444">Vispol</a>, <a href="http://johannesluderschmidt.de/lang/en-us/digital-volvelles-application-video/78/">Volvelles</a>) and thus reduces lag.</p>
<p>Hopefully, TUIO producers will support the output of TUIO via TCP natively soon (as far as I know at least <a href="http://johannesluderschmidt.de/lang/en-us/mac-os-x-multi-touch-tracking-software-touche/233/">Touché</a> does). However, you are on the safe side if you use memo&#8217;s <a href="http://www.memo.tv/cross_platform_open_source_udp_tcp_bridge_for_osc_tuio_etc">cross platform, open source, C++ UDP TCP bridge</a>.</p>
<p>The TCP tuio AS3 classes have been downloaded and adapted for the additional support of fiducials from <a href="http://www.touchgateway.com/?p=70">Touchgateway</a>.</p>
<p>So you can download fiducialtuioas3 in both flavors (via Flosc and via pure TCP TUIO) from <a href="http://code.google.com/p/fiducialtuioas3/">the fiducialtuioas3 google code repoitory</a> (on the right).</p>
<p>In the nuigroup there are a threads about fiducialtuioas3 <a href="http://nuigroup.com/forums/viewthread/5259/">here</a> and <a href="http://nuigroup.com/forums/viewthread/6597/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/fiducialtuioas3-now-supports-pure-tcp-tuio-messages/680/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load XML and text files from your HD into Flash with AS3 and PHP</title>
		<link>http://johannesluderschmidt.de/lang/en-us/load-xml-and-text-files-from-your-hd-into-flash-with-as3-and-php/629</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/load-xml-and-text-files-from-your-hd-into-flash-with-as3-and-php/629#comments</comments>
		<pubDate>Thu, 30 Jul 2009 21:39:29 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=629</guid>
		<description><![CDATA[In this post I’ll show how to load a file with a file chooser dialog from your local HD into an Internet Flash application in your browser. In another post I’ve explained how to save a file to HD from Flash. With a little workaround it is possible to load files into Flash in a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>In this post I’ll show how to load a file with a file chooser dialog from your local HD into an Internet Flash application in your browser. <a href="http://johannesluderschmidt.de/save-xml-and-text-files-from-flash-to-your-hd-with-as3-and-php/127/">In another post I’ve explained how to save a file to HD from Flash.</a></strong></p>
<p>With a little workaround it is possible to load files into Flash in a way that it feels just as if you would do it with a common application: You are being asked with a standard system file dialog, which file you want to load in your application.</p>
<p>However, at first you have to park (i.e. upload) your file on a server in order to make it &#8220;publicly&#8221; available for your Flash app:<br />
<div id="attachment_114" class="wp-caption alignnone" style="width: 295px"><a href="http://johannesluderschmidt.de/wp-content/uploads/2008/10/saveflashwatermarks.jpg"><img src="http://johannesluderschmidt.de/wp-content/uploads/2008/10/saveflashwatermarks-285x300.jpg" alt="Howto save and load text files with AS3" title="saveflashwatermarks" width="285" height="300" class="size-medium wp-image-114" /></a><p class="wp-caption-text">Figure 1: Howto save and load text files with AS3</p></div><br />
<span id="more-629"></span></p>
<p>But step by step. The procedure goes like this:</p>
<ul>
<li>You open up a file browser in Flash.</li>
<li>The user chooses a file from your HD and clicks OK.</li>
<li>The file is being uploaded from your HD to the server.</li>
<li>Flash loads the file from the server in itself.</li>
</ul>
<p>This code should do all the file handling in Flash for you:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> fileRef<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">FileReference</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> const FILE_UPLOAD_URL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = 
        <span style="color: #990000;">&quot;http://your-server.com/path/to/upload/flashUpload.php&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> const UPLOADED_XML_URL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = 
        <span style="color: #990000;">&quot;http://your-server.com/path/to/upload/&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> initializeFileRef<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
    <span style="color: #009900; font-style: italic;">//FileReference allows you to open up system file chooser dialogs and </span>
    <span style="color: #009900; font-style: italic;">//to simply upload files on a webserver</span>
    fileRef = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">FileReference</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">//after a file has been chosen in the file chooser dialog the function </span>
    <span style="color: #009900; font-style: italic;">//fileSelected will be called.</span>
    fileRef<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">SELECT</span><span style="color: #000066; font-weight: bold;">,</span> fileSelected<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">//after the chosen file has been uploaded to the server the function </span>
    <span style="color: #009900; font-style: italic;">//uploadCompleted will be called</span>
    fileRef<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> uploadCompleted<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #3f5fbf;">/**
 * upload chosen file from file chooser dialog to server
 */</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> fileSelected<span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	fileRef<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">upload</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>FILE_UPLOAD_URL<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;uploadFile&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #3f5fbf;">/**
 * load uploaded file from server into flash
 */</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> uploadCompleted<span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> uploadedFileUrl<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = UPLOADED_XML_URL <span style="color: #000066; font-weight: bold;">+</span> fileRef<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> downloadInFlashCompleted<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</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>uploadedFileUrl<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #3f5fbf;">/**
 * file has been completely loaded into Flash. You can now do with it
 * whatever you want to do.
 */</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> downloadInFlashCompleted<span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>The script at http://your-server.com/path/to/upload/flashUpload.php should look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>php
move_uploaded_file<span style="color: #000000;">&#40;</span>$_FILES<span style="color: #000000;">&#91;</span><span style="color: #990000;">'uploadFile'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'tmp_name'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> 
    $_FILES<span style="color: #000000;">&#91;</span><span style="color: #990000;">'uploadFile'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'name'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
#return something to flash<span style="color: #000066; font-weight: bold;">.</span> Otherwise the <span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>Complete 
#listener will not trigger<span style="color: #000066; font-weight: bold;">.</span>
echo <span style="color: #990000;">&quot;somethingThatFlashGetsAResponseToItsRequest.&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000066; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a href="http://johannesluderschmidt.de/wp-content/uploads/2009/07/LoadIntoFlash.zip">Download the Flash and the PHP example files.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/load-xml-and-text-files-from-your-hd-into-flash-with-as3-and-php/629/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter AS3 library TwitterScript Flex Example</title>
		<link>http://johannesluderschmidt.de/lang/en-us/twitter-as3-library-twitterscript-flex-example/564</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/twitter-as3-library-twitterscript-flex-example/564#comments</comments>
		<pubDate>Fri, 01 May 2009 09:13:46 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Actionsc]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=564</guid>
		<description><![CDATA[I have been looking around for Actionscript 3 libraries for the retrieval of data via the very nice Twitter API. Basically, TwitterScript seems to be a good choice for a Twitter Flash library as it wraps Twitter query URLs and packs the XML results automatically in arrays. However, as so often with Actionscript libraries there [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking around for Actionscript 3 libraries for the retrieval of data via the very nice <a href="http://apiwiki.twitter.com/Twitter-API-Documentation">Twitter API</a>. Basically, <a href="http://code.google.com/p/twitterscript/">TwitterScript</a> seems to be a good choice for a Twitter Flash library as it wraps Twitter query URLs and packs the XML results automatically in arrays. </p>
<p><a href="http://twitter.com/lagerkoller"><img src="http://johannesluderschmidt.de/wp-content/uploads/2009/05/twitter_tour_1.png" alt="Twitter Banner" title="Twitter Banner" width="450" height="136" class="aligncenter size-full wp-image-565" /></a></p>
<p>However, as so often with Actionscript libraries there is NO documentation pertaining TwitterScript available on its <a href="http://code.google.com/p/twitterscript/">Google code page</a>, there is no example included in the source code and the source code is not commented. What could be so difficult about providing a little piece of code like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Application xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span> 
      <span style="color: #004993;">addedToStage</span>=<span style="color: #990000;">&quot;init()&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
  <span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
    <span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
      <span style="color: #0033ff; font-weight: bold;">import</span> twitter<span style="color: #000066; font-weight: bold;">.</span>api<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span>TwitterStatus<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #0033ff; font-weight: bold;">import</span> twitter<span style="color: #000066; font-weight: bold;">.</span>api<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>TwitterEvent<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #0033ff; font-weight: bold;">import</span> twitter<span style="color: #000066; font-weight: bold;">.</span>api<span style="color: #000066; font-weight: bold;">.</span>TwitterSearch<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">import</span> twitter<span style="color: #000066; font-weight: bold;">.</span>api<span style="color: #000066; font-weight: bold;">.</span>Twitter<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> static const TWITTER_USER<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;stephenfry&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _twitter<span style="color: #000066; font-weight: bold;">:</span>Twitter<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _twitterSearch<span style="color: #000066; font-weight: bold;">:</span>TwitterSearch<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
        _twitter = <span style="color: #0033ff; font-weight: bold;">new</span> Twitter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        _twitterSearch = <span style="color: #0033ff; font-weight: bold;">new</span> TwitterSearch<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        _twitter<span style="color: #000066; font-weight: bold;">.</span>loadUserTimeline<span style="color: #000000;">&#40;</span>TWITTER_USER<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        _twitter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>TwitterEvent<span style="color: #000066; font-weight: bold;">.</span>ON_USER_TIMELINE_RESULT<span style="color: #000066; font-weight: bold;">,</span> 
            userTimelineResult<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        _twitterSearch<span style="color: #000066; font-weight: bold;">.</span>addKeyword<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ipad&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        _twitter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>TwitterEvent<span style="color: #000066; font-weight: bold;">.</span>ON_SEARCH<span style="color: #000066; font-weight: bold;">,</span> onSearchResult<span style="color: #000066; font-weight: bold;">,</span> 
            <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        _twitter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">search</span><span style="color: #000000;">&#40;</span>_twitterSearch<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> userTimelineResult<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>TwitterEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> twitterStatus<span style="color: #000066; font-weight: bold;">:</span>TwitterStatus<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i <span style="color: #0033ff; font-weight: bold;">in</span> e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
          twitterStatus = e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>
          <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;user tweets&quot;</span><span style="color: #000066; font-weight: bold;">,</span>twitterStatus<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#125;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onSearchResult<span style="color: #000000;">&#40;</span>event <span style="color: #000066; font-weight: bold;">:</span> TwitterEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> twitterStatus <span style="color: #000066; font-weight: bold;">:</span> TwitterStatus<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
          twitterStatus = event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
          <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;search result:&quot;</span><span style="color: #000066; font-weight: bold;">,</span>twitterStatus<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
      <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
  <span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Application<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>This example originates to <a href="http://blog.trevorboyle.com/?p=51">Trevor Boyle&#8217;s blog</a>. Improved by <a href="#comment-485">Kimi</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/twitter-as3-library-twitterscript-flex-example/564/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Touchlib&#8217;s TUIO Actionscript 3 Classes Enhanced With Fiducial Support (Source Code)</title>
		<link>http://johannesluderschmidt.de/lang/en-us/tuio-actionscript-3-open-source-fiducial-object-interaction-implementation/552</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/tuio-actionscript-3-open-source-fiducial-object-interaction-implementation/552#comments</comments>
		<pubDate>Wed, 22 Apr 2009 09:50:12 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Multi-Touch]]></category>
		<category><![CDATA[Tangible Interfaces]]></category>
		<category><![CDATA[tangible]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=552</guid>
		<description><![CDATA[In his Bachelor thesis Frederic Frieß enhanced the original Touchlib TUIO AS3 classes with support for fiducials (or to speak in TUIO terms with support for /tuio/2dobj messages). Thus, the Touchlib&#8217;s TUIO classes can simply be replaced with Frederic&#8217;s classes and everything should still work as before. However, there is one slight change in the [...]]]></description>
			<content:encoded><![CDATA[<p>In his Bachelor thesis Frederic Frieß enhanced the <a href="http://code.google.com/p/touchlib/source/browse/#svn/trunk/AS3/int/flash">original Touchlib TUIO AS3 classes</a> with support for fiducials (or to speak in <a href="http://johannesluderschmidt.de/lang/en-us/tuio-10-protocol-specification/486/">TUIO</a> terms with support for /tuio/2dobj messages).</p>
<p><a href="http://code.google.com/p/fiducialtuioas3/"><img src="http://johannesluderschmidt.de/wp-content/uploads/2009/04/fiducialtuioas3googlecodesplash.png" alt="fiducialtuioas3 Google code" title="fiducialtuioas3 Google code" width="450" height="60" class="size-full wp-image-556" /></a></p>
<p>Thus, the Touchlib&#8217;s TUIO classes can simply be replaced with Frederic&#8217;s classes and everything should still work as before. However, there is one slight change in the package structure: the TUIO classes are now lying inside the package <em>tuio</em> and not in the package <em>flash.events</em>.</p>
<p>I have made Frederic&#8217;s Tuio Fiducial AS3 classes available on Google code in a project called <a href="http://code.google.com/p/fiducialtuioas3/">fiducialtuioas3</a>.</p>
<p>If you want to use reacTIVision fiducials in Flash, Flex or Adobe Air you are heartily invited to use these classes in your private and professional project.</p>
<p>Examples of what has been done so far with those classes:<br />
<a href="http://johannesluderschmidt.de/lang/en-us/vispol-tangible-and-multi-touch-interface-video/474">Tangible Vispol</a><br />
<a href="http://johannesluderschmidt.de/lang/en-us/pf-design-media-installation/452"> Pf Design Media Installation</a></p>
<p>If you have a nice project with fiducialtuioas3 it would be great if you shared a link with us via mail or in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/tuio-actionscript-3-open-source-fiducial-object-interaction-implementation/552/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to get smooth image scaling in Flex</title>
		<link>http://johannesluderschmidt.de/lang/en-us/how-to-get-smooth-image-scaling-in-flex/549</link>
		<comments>http://johannesluderschmidt.de/lang/en-us/how-to-get-smooth-image-scaling-in-flex/549#comments</comments>
		<pubDate>Wed, 15 Apr 2009 11:21:11 +0000</pubDate>
		<dc:creator>johannes</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Adobe Air]]></category>

		<guid isPermaLink="false">http://johannesluderschmidt.de/?p=549</guid>
		<description><![CDATA[Great article from Ben Longoria about how to get smooth image scaling in Flex.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.actionsnip.com/snippets/vixiom/how-to-get-smooth-image-scaling-in-flex">Great article from Ben Longoria about how to get smooth image scaling in Flex.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johannesluderschmidt.de/lang/en-us/how-to-get-smooth-image-scaling-in-flex/549/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

