<?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/category/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 Fonts with Unicode Range</title>
		<link>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/</link>
		<comments>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:03:33 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime font]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=518</guid>
		<description><![CDATA[For a couple of months ago I publish a post about fonts embed with unicode range. There are ways on how to extract the fonts from Flash files with some de-compiling but for those who found the article interesting but never figured out the unicodeRange bit, well there is a solution.
1.) First look on how [...]]]></description>
			<content:encoded><![CDATA[<p>For a couple of months ago I publish a post about fonts embed with unicode range. There are ways on how to extract the fonts from Flash files with some de-compiling but for those who found the article interesting but never figured out the unicodeRange bit, well there is a solution.</p>
<p>1.) First look on how to setup and use the <a href="http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/" target="_blank">FontManager</a><br />
2.) Download <a href="http://undefined-type.com/wp-content/uploads/2009/10/UnicodeHexCreator.air">UnicodeHexCreator</a> I created to create the unicodeRange.</p>
<p>The AIR Unicode app is used to create the correct unicode range to optimize the amount of bytes that is needed to be loaded. To get the range it&#8217;s really simple.</p>
<p>1.) Copy/Paste your entire XML file to the input field (top field)<br />
2.) Select font to use and set class name.<br />
3.) Press convert<br />
4.) Copy/Paste the unicodeRange to the Flex Project that creates the font file.</p>
<p>Download <a href="http://undefined-type.com/wp-content/uploads/2009/10/UnicodeHexCreator.air">UnicodeHexCreator</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex 3, build Flash 10 apps</title>
		<link>http://undefined-type.com/2009/10/flex-3-build-flash-10-apps/</link>
		<comments>http://undefined-type.com/2009/10/flex-3-build-flash-10-apps/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 20:01:44 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[flash player 10]]></category>
		<category><![CDATA[flex 3]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=589</guid>
		<description><![CDATA[Just love Flex for building Flash 9, AIR and Flash 9 applications. But what about Flex 10 applications. As usual, new framework needs to be kicked in!
1.) Get the SDK
1.1.) Goto http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3/
1.2.) Download latest &#8220;stable build&#8221; and choose the &#8220;Adobe  Flex SDK&#8221;.
2.) Install the SDK
2.1.) Unzip and place the files under /Applications/Adobe Flex Builder 3/sdks/
2.2.) [...]]]></description>
			<content:encoded><![CDATA[<p>Just love Flex for building Flash 9, AIR and Flash 9 applications. But what about Flex 10 applications. As usual, new framework needs to be kicked in!</p>
<p>1.) <strong>Get the SDK</strong><br />
1.1.) Goto http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3/<br />
1.2.) Download latest &#8220;stable build&#8221; and choose the &#8220;Adobe  Flex SDK&#8221;.</p>
<p>2.) <strong>Install the SDK</strong><br />
2.1.) Unzip and place the files under /Applications/Adobe Flex Builder 3/sdks/<br />
2.2.) Open /Flex../sdks/flex_sdk_3.4.1.10084/frameworks/flex-config.xml<br />
2.3.) change to, line 17; &lt;target-player&gt;10.0.0&lt;/target-player&gt;<br />
2.4.) change to, line 52-54;<br />
&lt;external-library-path&gt;<br />
&lt;path-element&gt;libs/player/10/playerglobal.swc&lt;/path-element&gt;<br />
&lt;/external-library-path&gt;</p>
<p>2.5.) change to, lines 70-74;<br />
&lt;library-path&gt;<br />
&lt;path-element&gt;libs&lt;/path-element&gt;<br />
&lt;path-element&gt;libs/player/10&lt;/path-element&gt;<br />
&lt;path-element&gt;locale/{locale}&lt;/path-element&gt;<br />
&lt;/library-path&gt;</p>
<p>3.) <strong>Setup Flex</strong><br />
3.1.) Open Window-&gt;Preferences-&gt;Flex-&gt;Installed Flex SDKs<br />
3.2.) Add new SDK and choose the path that you copied to the Flex/sdks folder.<br />
Lets create a Project and test it out.</p>
<p>4.1.) <strong>Create a new Flex Project.</strong><br />
4.2.) Right click on the project and choose Properties-&gt;Flex Compiler<br />
4.3.) In the Flex SDK version, choose Use specific and Select the new SDK.<br />
4.4.) To help the express install make sure to update the &#8220;require flash version&#8221;.</p>
<p>Now you are done to Rock n Roll !!!</p>
<p>Wanna try it? Test the 3D functionality.<br />
&lt;mx:Canvas backgroundColor=&#8221;#3FCEDF&#8221; width=&#8221;110&#8243; height=&#8221;89&#8243; x=&#8221;304&#8243; y=&#8221;184&#8243; rotationY=&#8221;30&#8243; rotationX=&#8221;-30&#8243; /&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/10/flex-3-build-flash-10-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision 3D and Maya Camera</title>
		<link>http://undefined-type.com/2009/09/papervision-3d-and-maya-camera/</link>
		<comments>http://undefined-type.com/2009/09/papervision-3d-and-maya-camera/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 12:50:48 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[maya]]></category>
		<category><![CDATA[papervision]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=559</guid>
		<description><![CDATA[Worked with Papervision 3D in a couple of project and trying to simulate the Maya 3D world to Papervision 3D as much as possible to make it easier for the art directors. A big problem has been with the Maya Camera and units. What we did is that the 3d modeler setups a camera in [...]]]></description>
			<content:encoded><![CDATA[<p>Worked with Papervision 3D in a couple of project and trying to simulate the Maya 3D world to Papervision 3D as much as possible to make it easier for the art directors. A big problem has been with the Maya Camera and units. What we did is that the 3d modeler setups a camera in Maya and we are converting the values to the camera in actionscript to fit Papervision 3D.</p>
<p>What we are looking at is the FOV (focal length), the flash convert value is (xv / (2 * Math.tan(Math.PI * fov / 360))) /1.5;</p>
<p>Bojidar Dimitrov has an 1.5 lens converter that works excellent:<br />
<a href="http://www.bdimitrov.de/kmp/technology/fov.html" target="_blank">http://www.bdimitrov.de/kmp/technology/fov.html</a></p>
<p>By using the Maya Focal Length thru the converter and adding that to this formulas variable xv, you will get a Papervision 3D camera that is the same.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// FOV from Maya</span>
<span style="color: #000000; font-weight: bold;">var</span> fov:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">35</span>;
<span style="color: #808080; font-style: italic;">// FOV to F from http://www.bdimitrov.de/kmp/technology/fov.html</span>
<span style="color: #000000; font-weight: bold;">var</span> xv:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">45.741390734365076</span>;
<span style="color: #000000; font-weight: bold;">var</span> focus:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span>xv <span style="color: #66cc66;">/</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">tan</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span> <span style="color: #66cc66;">*</span> fov <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1.5</span>;
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span> = focus;</pre></td></tr></table></div>

<p>Please visit <a href="http://blog.papervision3d.org/" target="_blank">Papervision 3D</a> blog for great info.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/09/papervision-3d-and-maya-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getTimer NOW()</title>
		<link>http://undefined-type.com/2009/04/gettimer-now/</link>
		<comments>http://undefined-type.com/2009/04/gettimer-now/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 14:32:58 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[match time to flash]]></category>
		<category><![CDATA[millisecond]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=548</guid>
		<description><![CDATA[Matching timings in Flash takes a while and lazy as I am adding StopWatch functions all over&#8230; well.
So I use this simple thing, click on the textfield to start counting, press again to get milliseconds copied to clipboard.
(Please open the article to see the flash file or player.)
				var flashvars = {}; var params = {}; [...]]]></description>
			<content:encoded><![CDATA[<p>Matching timings in Flash takes a while and lazy as I am adding StopWatch functions all over&#8230; well.<br />
So I use this simple thing, click on the textfield to start counting, press again to get milliseconds copied to clipboard.</p>
<p><script type="text/javascript" src="http://undefined-type.com/wp-content/plugins/pb-embedflash/js/swfobject.js"></script><span class="embedflash" id="swfidfbcef51e744e2c413634b90d545ff897"><small>(Please open the article to see the flash file or player.)</small></span><script type="text/javascript">
				var flashvars = {}; var params = {}; var attributes = {};params.allowfullscreen = "true"; params.allowscriptaccess = "always";
				swfobject.embedSWF("/wp-content/uploads/2009/04/TimerApplication.swf","swfidfbcef51e744e2c413634b90d545ff897","300","300","9.0.0","http://undefined-type.com/wp-content/plugins/pb-embedflash/swf/expressInstall.swf",flashvars,params,attributes);
		</script></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/04/gettimer-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip of the day: Publish Time &amp; Memory Increase</title>
		<link>http://undefined-type.com/2009/04/tip-of-the-day-publish-time-memory-increase/</link>
		<comments>http://undefined-type.com/2009/04/tip-of-the-day-publish-time-memory-increase/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:32:53 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[swc]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=520</guid>
		<description><![CDATA[<script type="text/javascript" src="http://undefined-type.com/wp-includes/js/jquery/jquery.js"></script><script type="text/javascript" src="http://undefined-type.com/wp-content/plugins/pb-embedflash/js/sbadapter/shadowbox-jquery.js"></script><script type="text/javascript" src="http://undefined-type.com/wp-content/plugins/pb-embedflash/js/shadowbox.js"></script><script type="text/javascript"><!--
window.onload = function() {var options ={assetURL:'',loadingImage:'http://undefined-type.com/wp-content/plugins/pb-embedflash/css/images/loading.gif',flvPlayer:'http://undefined-type.com/wp-content/plugins/pb-embedflash/swf/mediaplayer.swf',animate:true,animSequence:'wh',overlayColor:'#000',overlayOpacity:0.85,overlayBgImage:'http://undefined-type.com/wp-content/plugins/pb-embedflash/css/images/overlay-85.png',listenOverlay:true,autoplayMovies:true,showMovieControls:true,resizeDuration:0.35,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:'default',viewportPadding:20,handleLgImages:'resize',initialHeight:160,initialWidth:320,enableKeys:true,keysClose:['c', 'q', 27],keysPrev:['p', 37],keysNext:['n', 39],handleUnsupported:'',text: {cancel:'Cancel',loading: 'loading',close:'<span class="shortcut">C</span>lose',next:'<span class="shortcut">N</span>ext',prev:'<span class="shortcut">P</span>revious',errors:{single: 'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared: 'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either: 'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}}};Shadowbox.init(options);}
--></script>At my company &#8220;Hello There&#8221; we are currently developing a really cool game that is built on the base of Papervision 3D 2.0 (Great White). We suddenly run into a really really annoying problem.
I could publish the Flash files without any complication but the other two team members couldn&#8217;t, and we have the same set [...]]]></description>
			<content:encoded><![CDATA[<p>At my company &#8220;Hello There&#8221; we are currently developing a really cool game that is built on the base of <a href="http://code.google.com/p/papervision3d/" target="_blank">Papervision 3D 2.0 (Great White)</a>. We suddenly run into a really really annoying problem.</p>
<p>I could publish the Flash files without any complication but the other two team members couldn&#8217;t, and we have the same set of workstations. After a lot of searching it seems somehow that it&#8217;s a memory problem and some suggestions points to changing JAVA memory, well, we didn&#8217;t get that to work either so we took another solution.</p>
<p>By making the Papervision package to a SWC file it&#8217;s already compiled and takes less memory for Flash. If you have a bigger framework you should as well take your time to create a SWC package for it. The publish time will decrease and your will be working happily ever after =)</p>
<p><strong>TIP: Use more SWC, will speed up your work &amp; use less memory.</strong></p>
<p>If you have Flex, here is an easy tutorial on how to create your SWC package.<br />
1.) Create a &#8220;Flex Library Project&#8221;.<br />
2.) Add your code that you want to compile.<br />
3.) Right click on the project, Properties-&gt;Flex Builder Path<br />
4.) Mark all the packages that you want to compile<br />
5.) Finish, just refresh the project to make sure everything is compiled when you change anything. The SWC file is placed in the /bin folder. Ready to use for Flex &amp; Flash.</p>
<p>Did a really short video;<br />
<small>(Please open the article to see the flash file or player.)</small>.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/04/tip-of-the-day-publish-time-memory-increase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 3 as CS4 development tool</title>
		<link>http://undefined-type.com/2009/01/flex-3-as-cs4-development-tool/</link>
		<comments>http://undefined-type.com/2009/01/flex-3-as-cs4-development-tool/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 15:26:13 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[code editor]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[development tool]]></category>
		<category><![CDATA[flash cs4]]></category>
		<category><![CDATA[flex 3]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=379</guid>
		<description><![CDATA[Are you as me and using Flex as a development tool and just switched to CS4 development. Well, no problem, you can still use Flex for your coding and debugging.
First you need to download and install Gumbo for flex.
1.) Download Gumbo: http://opensource.adobe.com/wiki/display/flexsdk/Downloads
2.) Place it inside the Flex SDK folder: /Applications/Adobe Flex Builder 3/sdks
3.) Go into [...]]]></description>
			<content:encoded><![CDATA[<p>Are you as me and using Flex as a development tool and just switched to CS4 development. Well, no problem, you can still use Flex for your coding and debugging.</p>
<p>First you need to download and install Gumbo for flex.<br />
1.) Download Gumbo: <a href="http://opensource.adobe.com/wiki/display/flexsdk/Downloads" target="_blank">http://opensource.adobe.com/wiki/display/flexsdk/Downloads</a><br />
2.) Place it inside the Flex SDK folder: /Applications/Adobe Flex Builder 3/sdks<br />
3.) Go into the library directory: /Applications/Adobe Flex Builder 3/sdks/{sdk version}/frameworks/libs/<br />
Remove all files except the /player/10/playerglobal.swc.<br />
Before: <a href="http://undefined-type.com/wp-content/uploads/2009/01/flex_sdk_before.png" rel="lightbox[379]"><img class="size-thumbnail wp-image-382 alignleft" title="flex_sdk_before" src="http://undefined-type.com/wp-content/uploads/2009/01/flex_sdk_before-150x150.png" alt="flex_sdk_before" width="150" height="150" /></a> After:</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2009/01/flex_sdk_after1.png" rel="lightbox[379]"><img class="size-thumbnail wp-image-387 alignnone" title="flex_sdk_after1" src="http://undefined-type.com/wp-content/uploads/2009/01/flex_sdk_after1-150x150.png" alt="flex_sdk_after1" width="150" height="150" /></a></p>
<p>4.) Open the &#8220;flex-config.xml&#8221; in the /Applications/Adobe Flex Builder 3/sdks/{sdk version}/frameworks/ folder<br />
Replace the text &#8220;{targetPlayerMajorVersion}&#8221; with &#8220;10&#8243;.</p>
<p>5.) Open/Restart Flex and add the SDK to flex: Preferences/Flex/Installed Flex SDKs<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/01/flex_add_sdk_1.png" rel="lightbox[379]"><img class="size-thumbnail wp-image-380 alignnone" title="flex_add_sdk_1" src="http://undefined-type.com/wp-content/uploads/2009/01/flex_add_sdk_1-150x150.png" alt="flex_add_sdk_1" width="150" height="150" /></a></p>
<p>6.) Create a empty ActionScript Project, In the window make sure to change the SDK (use a specific SDK).</p>
<p>Now you should be able to use Flex Builder as a code editor when building Flash CS4 projects. You can also look on how to <a href="http://undefined-type.com/2008/07/122/" target="_self">develop for CS3</a>. A tip is not to click finish, click the next button and in the field &#8220;Main source folder&#8221; enter src. Cleaner place for putting the fla &amp; as files.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/01/flex-3-as-cs4-development-tool/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ASDoc with Flex compiler</title>
		<link>http://undefined-type.com/2008/11/asdoc-with-flex-compiler/</link>
		<comments>http://undefined-type.com/2008/11/asdoc-with-flex-compiler/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 18:49:37 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[asdoc]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=194</guid>
		<description><![CDATA[A good thing when developing is to be able to generate code documentation for better overview and when sharing code for e.g. Open source or internal at your workplace.
With Flex you get the asdoc compiler, and by using Flex + ANT it&#8217;s simple to create some docs.
Make sure that you have ANT enabled and working.
1.) [...]]]></description>
			<content:encoded><![CDATA[<p>A good thing when developing is to be able to generate code documentation for better overview and when sharing code for e.g. Open source or internal at your workplace.</p>
<p>With Flex you get the asdoc compiler, and by using Flex + ANT it&#8217;s simple to create some docs.</p>
<p>Make sure that you have ANT enabled and working.<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>Now you can create a new Actionscript or Flex project. Place the ANT XML file in project root file and run the &#8220;create_asdoc&#8221;, a new folder &#8220;docs&#8221; will be created and there is where you find your documentation.</p>
<p><a href="http://undefined-type.com/wp-content/asdoc.xml">Download ANT Script here.</a><br />
For Windows users change the paths (C:/Program Files/Adobe/Flex Builder 3/sdks/3.0.0/bin/asdoc.exe)</p>
<p>Good links<br />
<a href="http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_9.html">ASDoc Tool</a><br />
<a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=asdoc_127_9.html#191202">Example on how to document code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/11/asdoc-with-flex-compiler/feed/</wfw:commentRss>
		<slash:comments>0</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>
	</channel>
</rss>

