<?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>AS3, Flex, Flash, PureMVC, Games &#187; AS3/Flash/Flex</title>
	<atom:link href="http://www.madflanderz.de/madblog/archives/category/as3flashflex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madflanderz.de/madblog</link>
	<description>AS3, Flex, Flash, PureMVC, Games</description>
	<lastBuildDate>Fri, 20 Jan 2012 17:05:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upload snapshot image from flash to server</title>
		<link>http://www.madflanderz.de/madblog/archives/301/upload-snapshot-image-from-flash-to-server/</link>
		<comments>http://www.madflanderz.de/madblog/archives/301/upload-snapshot-image-from-flash-to-server/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 11:25:01 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>
		<category><![CDATA[goodToKnow]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=301</guid>
		<description><![CDATA[Today i wanted to upload a captured image from a movieclip in a flash movie to a rails server. there are some task to complete to to this.
1. Flash Upload
I found a really nice und usefull class this morning. you can capture a bitmap image from a movieclip or from webcam and send it t [...]]]></description>
			<content:encoded><![CDATA[<p>Today i wanted to upload a captured image from a movieclip in a flash movie to a rails server. there are some task to complete to to this.</p>
<p><strong>1. Flash Upload</strong><br />
I found a really nice und usefull class this morning. you can capture a bitmap image from a movieclip or from webcam and send it t othe server. it is possible to add other parameters. the class creates a request like the FileReference class would do. on server side it looks the same.</p>
<p><a href="http://marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/">ow-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps</a></p>
<p><strong>2. save image in rails</strong><br />
i&#8217;m totally new to RubyOnRails but my first impression is really great. you can do everything in few lines of code. for upload und processing of images i found the <a href="https://github.com/thoughtbot/paperclip">paperclip gem</a> and this two great tutorials:</p>
<p><a href="http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails.html ">http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails.html </a></p>
<p><a href="http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/">http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/</a></p>
<p><strong>3. deal with the session problem</strong> </p>
<p>rails uses a cookie based session and if you upload files with flash this cookie is not send. the solution for this problem is this gem:<br />
<a href="https://github.com/trevorturk/flash_cookie_session">flash_cookie_session</a>. </p>
<p>for more information you can read here:<br />
<a href="http://erniemiller.org/2010/07/09/uploadify-and-rails-3/">rails 3</a> or<br />
<a href="http://jetpackweb.com/blog/2009/10/21/rails-2-3-4-and-swfupload-rack-middleware-for-flash-uploads-that-degrade-gracefully/comment-page-1/">rails 2.3</a></p>
<p>all together works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/301/upload-snapshot-image-from-flash-to-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 4 sample themes don&#8217;t work</title>
		<link>http://www.madflanderz.de/madblog/archives/290/flex-4-sample-themes-dont-work/</link>
		<comments>http://www.madflanderz.de/madblog/archives/290/flex-4-sample-themes-dont-work/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 12:33:21 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=290</guid>
		<description><![CDATA[Today i was playing with the different themes shipped with the FlexSDK. The original spark theme is so ugly. The good thing is &#8211; there are some more themes for us, like Arcade, Cobalt, Graphite and Zen. Also there are some CSS-Styled Spark-Themes like spark_cobalt and spark_desert.
For using another theme you have to add a [...]]]></description>
			<content:encoded><![CDATA[<p>Today i was playing with the different themes shipped with the FlexSDK. The original spark theme is so ugly. The good thing is &#8211; there are some more themes for us, like <strong>Arcade</strong>, <strong>Cobalt</strong>, <strong>Graphite</strong> and <strong>Zen</strong>. Also there are some CSS-Styled Spark-Themes like <strong>spark_cobalt</strong> and<strong> spark_desert</strong>.</p>
<p>For using another theme you have to add a additional compiler argument to your project.</p>
<p>The old Flex3 Halo Theme:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">-theme=D:\compiler\flex_sdk_4.5.0.17689\frameworks\themes\Halo\halo.swc</pre></div></div>

<p>A new Cobalt theme in the samples folder of the sdk</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">-theme=D:\compiler\flex_sdk_4.5.0.17689\samples\themes\cobalt\cobalt.swc</pre></div></div>

<p>Maybe you will get some css warnings and the project won&#8217;t compile, in this case turn of these warnings:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">-show-invalid-css-property-warnings=false
-show-unused-type-selector-warnings=false</pre></div></div>

<p>For using another CSS-styled theme copy the css file to your project und add this in your main-mxml:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;fx :Style source=<span style="color: #ff0000;">&quot;spark_cobalt.css&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>A full list of all sample themes with images you can see here:<br />
<a href="http://devgirl.org/2010/01/06/flex-4-sample-themes/">http://devgirl.org/2010/01/06/flex-4-sample-themes/</a></p>
<p>All this themes looks very nice &#8211; yeah, if there would be no big <strong>BUT</strong>! I really like the Cobalt-theme. But if you use the theme all scollbars are fucked up, they will not scroll down to the bottom. The problem occurs at all sample themes. I think without a scroller all these themes are completely useless. Again Flex4 sucks, arrgghhhh. PLEASE Adobe, please fix the problem. I&#8217;m not a designer and have not the time to create my own theme and i think i&#8217;m not the only one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/290/flex-4-sample-themes-dont-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Bug: swapChildren() doesn&#8217;t work on UIComponents</title>
		<link>http://www.madflanderz.de/madblog/archives/280/flex-bug-swapchildren-doesnt-work-on-uicomponents/</link>
		<comments>http://www.madflanderz.de/madblog/archives/280/flex-bug-swapchildren-doesnt-work-on-uicomponents/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 10:51:36 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>
		<category><![CDATA[FlexBugs]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=280</guid>
		<description><![CDATA[today i found another weird bug. i wanted to change the order of 2 elemente of a mx.containers.Canvas with swapChildren() but i got the following error:

[Fault] exception, information=ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
bzw.
[Fault] exception, information=ArgumentError: Error #2025: Das angegebene DisplayObject muss ein untergeordnetes Element des Aufrufers sein.

the error [...]]]></description>
			<content:encoded><![CDATA[<p>today i found another weird bug. i wanted to change the order of 2 elemente of a mx.containers.Canvas with swapChildren() but i got the following error:</p>
<blockquote><p>
[Fault] exception, information=ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.<br />
bzw.<br />
[Fault] exception, information=ArgumentError: Error #2025: Das angegebene DisplayObject muss ein untergeordnetes Element des Aufrufers sein.
</p></blockquote>
<p>the error is totally nonsense because both elements are childs of the canvas. here is a little bit code to show the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">getChildIndex</span><span style="color: #000000;">&#40;</span> _currentDisplay <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// output: 0</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: #004993;">getChildIndex</span><span style="color: #000000;">&#40;</span> _lastDisplay <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// output: 1</span>
&nbsp;
<span style="color: #009900;">//-- doesn't work. throws exeption</span>
<span style="color: #009900;">//this.swapChildren( _currentDisplay, _lastDisplay );</span>
&nbsp;
<span style="color: #009900;">//-- solution: </span>
<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span> _currentDisplay <span style="color: #000000;">&#41;</span>;
<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> _currentDisplay <span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>i got only 2 displayobjects in my canvas. if you got more than 2 you have to rewrite swapChildren by yourself. remove all childs and add it in the new order.</p>
<p>p.s.: everytime i use flex i&#8217;m feeling uncomfortable again because of some shit that doesn&#8217;t work like expected. i like flex but it seems to me that pure AS3 feels much more stable and reliable. if a have the choice i always prefer AS3.<br />
<a href="http://www.madflanderz.de/madblog/wp-content/uploads/flashdevelop4.jpg"><img src="http://www.madflanderz.de/madblog/wp-content/uploads/flashdevelop4-300x137.jpg" alt="" title="flashdevelop" width="300" height="137" class="alignnone size-medium wp-image-85" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/280/flex-bug-swapchildren-doesnt-work-on-uicomponents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Bug: smoothBitmapContent doesn&#8217;t work for reloaded images</title>
		<link>http://www.madflanderz.de/madblog/archives/276/flex-bug-smoothbitmapcontent-doesnt-work-for-reloaded-images/</link>
		<comments>http://www.madflanderz.de/madblog/archives/276/flex-bug-smoothbitmapcontent-doesnt-work-for-reloaded-images/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 10:09:17 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[FlexBugs]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=276</guid>
		<description><![CDATA[SmoothBitmapContent works only for first loaded image. After changing the source of an image smoothing becomes false.
The Solution: attach a loading complete listener and change the smooth property of the loaded image by yourself.

	&#60;mx :Script&#62;
		&#60; !&#91;CDATA&#91;
&#160;
			/**
			 * Flex Bug: after reloading the image smoothing is false. smoothBitmapContent works only for first loaded image.
			 * Solution: [...]]]></description>
			<content:encoded><![CDATA[<p>SmoothBitmapContent works only for first loaded image. After changing the source of an image smoothing becomes false.<br />
The Solution: attach a loading complete listener and change the smooth property of the loaded image by yourself.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">&lt;</span>mx <span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Flex Bug: after reloading the image smoothing is false. smoothBitmapContent works only for first loaded image.
			 * Solution: set the smooting property of the 
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onImageLoaded<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #004993;">log</span>.<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;onImageLoaded()&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #009900;">//-- doesn't work </span>
				<span style="color: #009900;">//preview.smoothBitmapContent = true; </span>
&nbsp;
				<span style="color: #009900;">// works</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = preview.<span style="color: #004993;">content</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span>;
				<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> bmp <span style="color: #000000;">&#41;</span> bmp.<span style="color: #004993;">smoothing</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx <span style="color: #000000; font-weight: bold;">:</span>Image id=<span style="color: #990000;">&quot;preview&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;200&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100&quot;</span> smoothBitmapContent=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;{ _previewPath }&quot;</span> <span style="color: #004993;">complete</span>=<span style="color: #990000;">&quot;onImageLoaded()&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/276/flex-bug-smoothbitmapcontent-doesnt-work-for-reloaded-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Code Libraries</title>
		<link>http://www.madflanderz.de/madblog/archives/51/as3-code-libraries/</link>
		<comments>http://www.madflanderz.de/madblog/archives/51/as3-code-libraries/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 14:56:54 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=51</guid>
		<description><![CDATA[Hier mal eine super Liste mit OpenSource AS3 Code Libraries
http://www.adrianparr.com/?p=83
]]></description>
			<content:encoded><![CDATA[<p>Hier mal eine super Liste mit OpenSource AS3 Code Libraries</p>
<p><a href="http://www.adrianparr.com/?p=83">http://www.adrianparr.com/?p=83</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/51/as3-code-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Stolpersteine</title>
		<link>http://www.madflanderz.de/madblog/archives/47/as3-stolpersteine/</link>
		<comments>http://www.madflanderz.de/madblog/archives/47/as3-stolpersteine/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 15:51:43 +0000</pubDate>
		<dc:creator>madflanderz</dc:creator>
				<category><![CDATA[AS3/Flash/Flex]]></category>

		<guid isPermaLink="false">http://www.madflanderz.de/madblog/?p=47</guid>
		<description><![CDATA[Frame rate
Loaded movies also, in most cases, inherit the parent movie&#8217;s frame rate. For example, a SWF file whose frame rate is 12 fps, when loaded into a movie whose frame rate is 24 fps, will play back at 24 fps. The only exception is if the movie being loaded contains a sound on the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Frame rate</strong></p>
<p>Loaded movies also, in most cases, inherit the parent movie&#8217;s frame rate. For example, a SWF file whose frame rate is 12 fps, when loaded into a movie whose frame rate is 24 fps, will play back at 24 fps. <strong>The only exception is if the movie being loaded contains a sound on the timeline whose sync is set to &#8220;stream&#8221;. </strong>Only then will the main movie then inherit the frame rate of the loaded movie as to assure the correct playback of that sound. </p>
<p><strong>TextEvent.LINK</strong><br />
Textevent werden nur gefeuert, wenn das Textfeld selectable ist.<br />
<a href="http://jobemakar.blogspot.com/2007/05/texteventlink-bug-in-actionscript-3.html">Quelle</a></p>
<div id="attachment_63" class="wp-caption alignnone" style="width: 310px"><a href="http://www.madflanderz.de/madblog/wp-content/uploads/flashdevelop.jpg"><img src="http://www.madflanderz.de/madblog/wp-content/uploads/flashdevelop-300x137.jpg" alt="FlashDevelop Programming AS3 Flex" title="flashdevelop mittelgroß (300 x 137)" width="300" height="137" class="size-medium wp-image-63" /></a><p class="wp-caption-text">FlashDevelop Programming AS3 Flex</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.madflanderz.de/madblog/archives/47/as3-stolpersteine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

