<?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>undefined-type &#187; Flex</title>
	<atom:link href="http://undefined-type.com/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://undefined-type.com</link>
	<description>Flex,Flash &#38; AIR</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:48:23 +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>Runtime Dynamic Fonts for CS4 (fp9), next-gen</title>
		<link>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/</link>
		<comments>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 13:35:04 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=440</guid>
		<description><![CDATA[Runtime Fonts for Flash is a wonderful way when building apps, even better if you are as me and creating international apps for a lot of countries, you have the language supports and the problem with characters in fonts when staring to look at Greek, Japanese, Korea, Chinese and so on.  I have a [...]]]></description>
			<content:encoded><![CDATA[<p>Runtime Fonts for Flash is a wonderful way when building apps, even better if you are as me and creating international apps for a lot of countries, you have the language supports and the problem with characters in fonts when staring to look at Greek, Japanese, Korea, Chinese and so on.  I have a old <a href="http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/">Runtime font for CS3</a> that works pretty well. But when starting to use CS4 I wanted to improve the loading and sharing. </p>
<p>So the idea was to use Flex to compile Font SWF files, a big problem when I use Flash CS4 (fp9) and Flex 3. Flex will not recognize my font SWF file, it will also not recognize my local fonts to embed bold/italic font sets. Using an exported CS3 (fp9) file it works just fine.<br />
Note; fp9 = Flash Player 9.</p>
<p>So lets look of how to do this.<br />
First we need to create our font file.<br />
1.) Create an Flex ActionScript project (I use framework 3.2)<br />
2.) The Class name will be something that we will get later so I renamed my as file to FontHolder.as<br />
3.) Remove the constructor and add the embed tags, example below. Note the unicodeRange tag, these are used to select characters to be embedded, remove to embed the entire font.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FontHolder <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>systemFont=<span style="color: #ff0000;">'Verdana'</span>, fontFamily=<span style="color: #ff0000;">'Verdana'</span>, mimeType=<span style="color: #ff0000;">'application/x-font'</span>, unicodeRange=<span style="color: #ff0000;">'U+0061-U+0074'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const verdana_regular:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>systemFont=<span style="color: #ff0000;">'Verdana'</span>, fontFamily=<span style="color: #ff0000;">'Verdana'</span>, mimeType=<span style="color: #ff0000;">'application/x-font'</span>, fontWeight=<span style="color: #ff0000;">'bold'</span>, unicodeRange=<span style="color: #ff0000;">'U+0061-U+0074'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const verdana_bold:<span style="color: #000000; font-weight: bold;">Class</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>4.) Now you have your font SWF file to use for the project.</p>
<p>So with your font file it&#8217;s time to use it in the project. In this example I use my <a href="http://undefined-type.com/2008/07/122/">Flex 3 as CS3 development tool.</a>, this is because I create Flash Player 9 project. You can of course use only Flash IDE or any other kind of code editor.<br />
1.) Create a new ActionScript project, change the SDK to CS3.<br />
2.) Click next, &#8220;Main source folder&#8221;, type &#8220;src&#8221;, this is just to put the files more pretty =), Click Finish.<br />
3.) Create a CSS file that will control the fonts. &#8220;default.css&#8221;. Just add two classes that we can work with.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">h1<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">24px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
body<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>5.) Download the <a href="http://undefined-type.com/wp-content/uploads/2009/02/fontmanager.swc">FontManager.swc</a> file and add it to your project.</p>
<p>Add SWC <strong>HowTo</strong> for <strong>Flex</strong><br />
6.1.) Create a folder called swc in project folder.<br />
6.2.) Place the FontManager.swc file into the created folder.<br />
6.3.) Right-Click on project folder and select properties<br />
6.4.) In menu choose &#8220;ActionScript Build Path&#8221;, Choose the tab &#8220;Library path&#8221;<br />
6.5.) Click on &#8220;Add SWC Folder&#8221;,  Select the created swc folder and close the windows, all done.</p>
<p>Add SWC <strong>HowTo</strong> for <strong>Flash</strong><br />
7.1.) Create a folder called swc in project folder.<br />
7.2.) Place the FontManager.swc file into the created folder.<br />
7.3.) Open Flash and Publish Settings.<br />
7.4.) Choose the Flash tab and click on Settings next to the script combobox.<br />
7.5.) Choose the &#8220;Library Path&#8221; tab and add the swc file to the list, all done. </p>
<p>So, everything is there. How am I using it? Well, this is a dump on the project playground.<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/dynamic_files1.png" rel="lightbox[440]"><img class="alignleft size-full wp-image-454" title="dynamic_files1" src="http://undefined-type.com/wp-content/uploads/2009/02/dynamic_files1.png" alt="dynamic_files1" width="192" height="218" /></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>To be able to use the fonts they are needed first to be loaded. By default this is the structure for font swf and css file named default. They can be changed by FontManager.name = &#8216;default&#8217; (the name) and the path with FontManager.path = &#8216;fonts/&#8217;.</p>
<p>The easiest way is to just get the singleton and load it.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> manager:FontManager=FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
manager.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, onManagerComplete<span style="color: #66cc66;">&#41;</span>;
manager.<span style="color: #006600;">loadStandalone</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>When it&#8217;s loading just send the textfield, style and text to the FontManager, you can add only textfield and text if you want to add e.g. multiple styles to one textfield.<br />
Here&#8217;s some examples.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onManagerComplete<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>tf, <span style="color: #ff0000;">&quot;h1&quot;</span>, <span style="color: #ff0000;">&quot;abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> tf1:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf1.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">150</span>;
	tf1.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf1.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>tf1, <span style="color: #ff0000;">&quot;body&quot;</span>, <span style="color: #ff0000;">&quot;abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf1<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> tf2:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf2.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">300</span>;
	tf2.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf2.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#40;</span>tf2, <span style="color: #ff0000;">&quot;&lt;h1&gt;abc&lt;/h1&gt;<span style="color: #000099; font-weight: bold;">\n</span>abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf2<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex ANT + SVN tasks</title>
		<link>http://undefined-type.com/2008/09/flex-ant-svn-tasks/</link>
		<comments>http://undefined-type.com/2008/09/flex-ant-svn-tasks/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 18:01:40 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=182</guid>
		<description><![CDATA[I using ANT + SVN tasks a lot for compiling the startup for projects. Took me a while to setup it to work on MAC but the solutions was pretty easy. This will work on a PC as well.
What you first need.
You need the ANT plug-in and you can get that from Eclipse JDT Development
1.) [...]]]></description>
			<content:encoded><![CDATA[<p>I using ANT + SVN tasks a lot for compiling the startup for projects. Took me a while to setup it to work on MAC but the solutions was pretty easy. <em>This will work on a PC as well.</em></p>
<p><strong>What you first need.</strong><br />
You need the <strong>ANT plug-in</strong> and you can get that from Eclipse JDT Development<br />
1.) Open Flex Builder<br />
2.) Help -&gt; Software Updates -&gt; Find and Install&#8230;<br />
3.) Select: Search for new features to install<br />
4.) Mark: &#8220;The Eclipse Project Updates&#8221; and click Finish. (<a href="http://update.eclipse.org/updates/3.3">url if needed</a>)<br />
5.) Expand the tree &#8220;Eclipse 3.3.2&#8243; or newer.<br />
6.) Find: &#8220;Eclipse Java Development Tools&#8221;, Mark and install.</p>
<p><strong>This is what you do.</strong><br />
1.) You will need SVN Ant, and for some actions it help to add the <a href="http://jakarta.apache.org/regexp/">jakarta regexp</a>, <a href="http://jakarta.apache.org/oro/index.html">jakarta oro</a>, <a href="http://commonclipse.sourceforge.net/">commons</a>, <a href="http://commons.apache.org/net/index.html">commons-net</a> packages. <strong>To make it simple</strong>, <a href="http://undefined-type.com/wp-content/svnant_10.zip">grab this zip file.</a><br />
2.) Open &#8220;Flex folder&#8221;/plugins/ and create a folder &#8220;svnant&#8221; and place all the files.<br />
3.) Open Flex -&gt; Preferences -&gt; Ant -&gt; Runtime<br />
4.) Select &#8220;And Home Entries&#8221; and then &#8220;Add External JARs&#8230;&#8221;<br />
5.) Select all the JAR files you copied to /Flex Builder 3/plugins/svnant/<br />
6.) Create a new project in Flex. Place the <a href="http://undefined-type.com/wp-content/build.xml">build.xml</a> file in the project root.<br />
7.) Right click on the build.xml and select Open With -&gt; Ant Editor.<br />
8.) Set your properties in the top and then right click on <strong>getSVNCode</strong> in the &#8220;Outline window&#8221;, Run As -&gt; Ant Build.</p>
<p><strong>TIP.</strong><br />
ANT scripts can grab properties files and run ANT tasks from other ANT files. So you could setup a structure how to read scripts and unique project data to make it more generic.</p>
<p><strong>Documentation to read.</strong><br />
SVN: <a href="http://subclipse.tigris.org/svnant/svn.html">http://subclipse.tigris.org/svnant/svn.html</a><br />
ANT: <a href="http://ant.apache.org/manual/tasksoverview.html">http://ant.apache.org/manual/tasksoverview.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/09/flex-ant-svn-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Memory on Mac</title>
		<link>http://undefined-type.com/2008/09/flex-memory-on-mac/</link>
		<comments>http://undefined-type.com/2008/09/flex-memory-on-mac/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 17:58:53 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=176</guid>
		<description><![CDATA[Having problem when developing Flex sites with the memory, is it to slow? No probs, lets kick it up a notch.
1.) Go into Flex Package Content, CTRL+&#8221;Mouse Click&#8221; on the Flex Builder 3 file and select &#8220;Show Package Content&#8221;

2.) Go into Contents -&#62; MacOS and open &#8220;FlexBuilder.ini&#8221;.
3.) Change memory to what you want.
-Xms = Minimum [...]]]></description>
			<content:encoded><![CDATA[<p>Having problem when developing Flex sites with the memory, is it to slow? No probs, lets kick it up a notch.</p>
<p>1.) Go into Flex Package Content, CTRL+&#8221;Mouse Click&#8221; on the Flex Builder 3 file and select &#8220;Show Package Content&#8221;</p>
<p><a href="http://undefined-type.com/wp-content/flex_memory_1.png" rel="lightbox[176]"><img class="alignnone size-full wp-image-245" title="flex_memory_1" src="http://undefined-type.com/wp-content/flex_memory_1.png" alt="flex_memory_1" width="394" height="136" /></a></p>
<p>2.) Go into Contents -&gt; MacOS and open &#8220;FlexBuilder.ini&#8221;.</p>
<p>3.) Change memory to what you want.<br />
-Xms = Minimum Memory<br />
-Xmx = Maximum Memory</p>
<p><a href="http://undefined-type.com/wp-content/flex_memory_2.png" rel="lightbox[176]"><img class="alignnone size-full wp-image-246" title="flex_memory_2" src="http://undefined-type.com/wp-content/flex_memory_2.png" alt="flex_memory_2" width="366" height="204" /></a></p>
<p>So change the Xmx to a higher value, e.g.<br />
-Xmx1024m</p>
<p><strong>Ant Script</strong><br />
This doesn&#8217;t work if memory isn&#8217;t enought for running ant scripts. If this is your problem, try this.<br />
1.) Open Flex Builder<br />
2.) Window -&gt; Preferences -&gt; Java -&gt; Installed JREs<br />
3.) Mark the JVM package that you are using when running the Ant script and click &#8220;Edit&#8221;.<br />
4.) Add memory properties to the &#8220;Default VM Arguments&#8221;, e.g. &#8220;-Xmx1024m&#8221;.</p>
<p><a href="http://undefined-type.com/wp-content/flex_memory_3.png" rel="lightbox[176]"><img class="alignnone size-full wp-image-247" title="flex_memory_3" src="http://undefined-type.com/wp-content/flex_memory_3.png" alt="flex_memory_3" width="498" height="292" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/09/flex-memory-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Builder &#8211; Built in Compare Tools</title>
		<link>http://undefined-type.com/2008/07/flex-builder-built-in-compare-tools/</link>
		<comments>http://undefined-type.com/2008/07/flex-builder-built-in-compare-tools/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 17:29:05 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[versions]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=137</guid>
		<description><![CDATA[Did you know that Flex Builder has support for comparing file (even from different projects) and keeping a local history for your files without that you need to use SVN/CVS.
Example #1 : Local History
1.) Right click on your file.

2.) Select Compare With -&#62; Local History
3.) Select when you want to compare with.

4.) Do the comparison [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that Flex Builder has support for comparing file (even from different projects) and keeping a local history for your files without that you need to use SVN/CVS.</p>
<p>Example #1 : Local History<br />
1.) Right click on your file.</p>
<p><a href="http://undefined-type.com/wp-content/compare-history-1.png" rel="lightbox[137]"><img class="alignnone size-medium wp-image-259" title="compare-history-1" src="http://undefined-type.com/wp-content/compare-history-1-255x299.png" alt="compare-history-1" width="255" height="299" /></a></p>
<p>2.) Select Compare With -&gt; Local History<br />
3.) Select when you want to compare with.</p>
<p><a href="http://undefined-type.com/wp-content/compare-history-2.png" rel="lightbox[137]"><img class="alignnone size-medium wp-image-260" title="compare-history-2" src="http://undefined-type.com/wp-content/compare-history-2-248x300.png" alt="compare-history-2" width="248" height="300" /></a></p>
<p>4.) Do the comparison =)<br />
<a href="http://undefined-type.com/wp-content/compare-history-3.png" rel="lightbox[137]"><img class="alignnone size-medium wp-image-269" title="compare-history-3" src="http://undefined-type.com/wp-content/compare-history-3-300x134.png" alt="compare-history-3" width="300" height="134" /></a></p>
<p>Example #2 : File Compare<br />
1.) Select 2 files and right click.</p>
<p><a href="http://undefined-type.com/wp-content/compare-file-1.png" rel="lightbox[137]"><img class="alignnone size-medium wp-image-270" title="compare-file-1" src="http://undefined-type.com/wp-content/compare-file-1-253x300.png" alt="compare-file-1" width="253" height="300" /></a></p>
<p>2.) Select Compare With -&gt; Each Other<br />
3.) Do the comparison =)<br />
<a href="http://undefined-type.com/wp-content/compare-file-2.png" rel="lightbox[137]"><img class="alignnone size-medium wp-image-273" title="compare-file-2" src="http://undefined-type.com/wp-content/compare-file-2-300x124.png" alt="compare-file-2" width="300" height="124" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/07/flex-builder-built-in-compare-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Builder Plugins</title>
		<link>http://undefined-type.com/2008/07/flex-builder-plugins/</link>
		<comments>http://undefined-type.com/2008/07/flex-builder-plugins/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 17:31:36 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=145</guid>
		<description><![CDATA[Flex Builder doesn&#8217;t have all the tools for your development, take XML for e.g.
So here is some plugins that might help. To install:
1.) Open Flex, Goto menu Help -&#62; Software Updates -&#62; Find and Install.
2.) Select &#8220;Search for new features to install&#8221;.
3.) Add a &#8220;New Remote Site&#8230;&#8221;, enter a prefered name and the url.
4.) Mark [...]]]></description>
			<content:encoded><![CDATA[<p>Flex Builder doesn&#8217;t have all the tools for your development, take XML for e.g.<br />
So here is some plugins that might help. To install:<br />
1.) Open Flex, Goto menu Help -&gt; Software Updates -&gt; Find and Install.<br />
2.) Select &#8220;Search for new features to install&#8221;.<br />
3.) Add a &#8220;New Remote Site&#8230;&#8221;, enter a prefered name and the url.<br />
4.) Mark the site checkbox and Finish next and then just follow the instructions.</p>
<p><strong>Aptana</strong><br />
It has some XML, JavaScript, PHP, Ruby on Rails, AIR and so on. The best thing that it&#8217;s totally free as long as you can stay away from the Pro version.<br />
Install Path: <a href="http://update.aptana.com/install/3.2/">http://update.aptana.com/install/3.2/</a></p>
<p><strong>Subversive</strong><br />
Excellent SVN tool for your development, note here that Aptana has the plugin &#8220;Subclipse&#8221; that as well is a SVN software. Don&#8217;t know why but I like subversive more.<br />
Install Path: <a href="http://www.polarion.org/projects/subversive/download/2/update-site/">http://www.polarion.org/projects/subversive/download/2/update-site/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/07/flex-builder-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3 as CS3 development tool</title>
		<link>http://undefined-type.com/2008/07/122/</link>
		<comments>http://undefined-type.com/2008/07/122/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 17:09:32 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=122</guid>
		<description><![CDATA[I&#8217;ve played around a little with Flex 3 Builder. I love the FDT plugin to Eclipse. But I think it&#8217;s a little to expensive and for having a use for it I need the enterprise to get debugger functionality.
So I started to search and to play around with my Flex 3 Builder, why can&#8217;t I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve played around a little with <a href="http://www.adobe.com/products/flex/">Flex 3 Builder</a>. I love the <a href="http://fdt.powerflasher.com/">FDT plugin</a> to <a href="http://www.eclipse.org/">Eclipse</a>. But I think it&#8217;s a little to expensive and for having a use for it I need the enterprise to get debugger functionality.</p>
<p>So I started to search and to play around with my Flex 3 Builder, why can&#8217;t I use this??? Well, as it looks like it&#8217;s actually possible.</p>
<p>I created a little video tutorial how to set it up. This is my first video tutorial so sorry if it&#8217;s a little strange. If anyone got some good tips of how to create video tutorials please let me know because this was harder than I thought. The files are very big so will try to record them all over.</p>
<p><span id="more-122"></span></p>
<p><strong>1.) Compile CS3 core library</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step1.swf">Watch the video (3.6mb)</a><br />
1.1) Create Flex Library Project.<br />
1.2) Copy the Flash CS3 fl.* package to project folder.<br />
1.3) Go into Project Properties -&gt; Flex Library Build Path<br />
1.4) Mark the fl.* package to be build, then close window.<br />
1.5) Done, now the Flex Builder compiles the SWC file.<br />
&#8211; UPDATE &#8211;<br />
You can <a href="http://undefined-type.com/wp-content/uploads/2008/07/flash_cs3_core_components.swc">download swc file</a> from here</p>
<p><strong>2.) Change Flex framework</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step2.swf">Watch the video (19.2mb)</a><br />
2.1) Find the Flex 3.0.0 SDK (inside Flex Application folder) and make a copy<br />
2.2) In your copy change the name of the SDK inside flex-sdk-description.xml<br />
2.3) Remove all files except the &#8220;player&#8221; folder in framework/lib<br />
2.4) Inside the &#8220;player&#8221; folder, remove the swc file.<br />
2.5) Copy the &#8220;playerglobal.swc&#8221; file from &#8220;Flash CS3/Configuration/ActionScript 3.0/Classes/&#8221; into the &#8220;player&#8221; folder.<br />
&#8211; UPDATE &#8211;<br />
Place the created/downloaded SWC file in same folder<br />
&#8212;&#8212;&#8212;&#8212;<br />
2.6) Open Flex Builder 3 and open Preferences-&gt;Flex-Installed Flex SDKs.<br />
2.7) Add new SDK and point to your SDK folder. Then click OK and close.<br />
2.8) All done, you have a new SDK CS3 and Flash CS3 compiled fl.* package, start to work!</p>
<p><strong>3.) Create a Project</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step3.swf">Watch the video (11.0mb)</a><br />
3.1) Create a ActionScript project.<br />
3.2) Change the SDK to the one created in Step 2. Then hit next (NOT Finished)<br />
3.3) Change tab to &#8220;Library Path&#8221; and add the SWC file created in step 1. Then hit Finished.<br />
3.4) Create FLA file and save to project, add the Flex class as Document Class.<br />
3.5) Open &#8220;Publish Settings&#8221; and Check &#8220;Permit debugging&#8221;.<br />
3.6) Open Settings for ActionScript version. Unmark &#8220;Automatically declare stage instances&#8221;.<br />
3.7) Now you all good to go. Example, add Textarea to stage and declare instance.<br />
&#8211; UPDATED &#8211;<br />
If you doing the updated tags, skip 3.3</p>
<p><strong>4.) Debug a Project</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step4.swf">Watch the video (9.4mb)</a><a href="http://undefined-type.com/media/blogs/a/swf/Flex3_cs3_step4.swf" target="_blank"></a><br />
3.1) Flash CS3: Export your flash project with Debug -&gt; Debug Movie<br />
3.2) Flex: In the menu open debugger profile.<br />
3.3) In URL;s remove default settings and point Debug to your exported SWF file.<br />
3.4) Add a breakpoint in the code and run from flex debugger.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/07/122/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flex 3 Profiler = Life saver</title>
		<link>http://undefined-type.com/2008/07/flex-3-profiler-life-saver/</link>
		<comments>http://undefined-type.com/2008/07/flex-3-profiler-life-saver/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 17:05:54 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[profiler]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=115</guid>
		<description><![CDATA[Did some testing with Papervision 3D &#8211; Great White (2.0), strangly when I change my dataProvider for the Menu the memory kicks up a bit and never goes down. Tried to add weak listeners and nothing worked.
Then I started to look at the Profiler, by setting a &#8220;Memory Snapshot&#8221; in the end after a lot [...]]]></description>
			<content:encoded><![CDATA[<p>Did some testing with <strong>Papervision 3D &#8211; Great White (2.0)</strong>, strangly when I change my dataProvider for the Menu the memory kicks up a bit and never goes down. Tried to add weak listeners and nothing worked.</p>
<p>Then I started to look at the Profiler, by setting a &#8220;Memory Snapshot&#8221; in the end after a lot of clicking I can compare the 2 Snapshots and saw that the 2 classes <strong>RenderRecStorage</strong> and <strong>Vertex3DInstance</strong> was never collected by the garbage collector.</p>
<p>Using Flex 3 I can search All Files in the project and noticed that it&#8217;s the <strong>BitmapMaterial</strong> class that is never destroyed, even if I remove the <strong>DisplayObject3D</strong>;s from the Scene.<br />
So I simply put all the material in a Array and when removing the <strong>DisplayObject3D</strong> from stage I make sure that I run <strong>*.destroy();</strong> on the <strong>BitmapMaterial</strong> classes.</p>
<p>So this is how it looked like before.</p>
<p><img class="alignleft size-medium wp-image-277" title="papervision3d-profiler2" src="http://undefined-type.com/wp-content/uploads/2008/07/papervision3d-profiler2-300x70.png" alt="papervision3d-profiler2" width="300" height="70" /></p>
<p>And now. Problem solved, the memory profile looks like it should <img src='http://undefined-type.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://undefined-type.com/wp-content/uploads/2008/07/papervision3d-profiler.png" rel="lightbox[115]"><img class="alignleft size-medium wp-image-278" title="papervision3d-profiler" src="http://undefined-type.com/wp-content/uploads/2008/07/papervision3d-profiler-300x75.png" alt="papervision3d-profiler" width="300" height="75" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/07/flex-3-profiler-life-saver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 2, Viewstack latency</title>
		<link>http://undefined-type.com/2007/09/flex-2-viewstack-latency/</link>
		<comments>http://undefined-type.com/2007/09/flex-2-viewstack-latency/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 16:17:48 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[latency]]></category>
		<category><![CDATA[viewstack]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=44</guid>
		<description><![CDATA[When using viewstack I notice that it shows to early for me. The mxml page that I want to display is to heavy to create so the page shows up and isn’t completly ready too be shown.
Problem here is that the viewstack has to many private functions so it’s not possible to override the functions [...]]]></description>
			<content:encoded><![CDATA[<p>When using viewstack I notice that it shows to early for me. The mxml page that I want to display is to heavy to create so the page shows up and isn’t completly ready too be shown.</p>
<p>Problem here is that the viewstack has to many private functions so it’s not possible to override the functions needed. This is my solution.</p>
<p>1.) In every mxml to be shown i created build(); and destroy(); functions. These are used to add listeners, set text, remove listeners and so on. I also added a variable :<br />
public var INITIALIZED:Boolean=false;<br />
Then to show that my build () function has run I broadcast an event.<br />
It looks like this;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> INITIALIZED:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> build<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">this</span>.<span style="color: #006600;">INITIALIZED</span> = <span style="color: #000000; font-weight: bold;">true</span>;
    dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span>Page.<span style="color: #006600;">INITIALIZED</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> destroy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">this</span>.<span style="color: #006600;">INITIALIZED</span> = <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Then I extend the viewstack that the pages lies in. on addChild I added my listener. Override the validateDisplayList to make sure the build function is runned and in the listener I showed the page.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addChild<span style="color: #66cc66;">&#40;</span>child:DisplayObject<span style="color: #66cc66;">&#41;</span>:DisplayObject
<span style="color: #66cc66;">&#123;</span>
    child.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Page.<span style="color: #006600;">INITIALIZED</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">pageInitialized</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">return</span> <span style="color: #0066CC;">super</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>child<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> validateDisplayList<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">super</span>.<span style="color: #006600;">validateDisplayList</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #000000; font-weight: bold;">var</span> child:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span>getChildAt<span style="color: #66cc66;">&#40;</span>selectedIndex<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>child.<span style="color: #006600;">INITIALIZED</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        child.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
        child.<span style="color: #006600;">endEffectsStarted</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span>child<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">build</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> pageInitialized<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> child:Container = Container<span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>;
    child.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
    child.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlexEvent<span style="color: #66cc66;">&#40;</span>FlexEvent.<span style="color: #0066CC;">SHOW</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2007/09/flex-2-viewstack-latency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

