<?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; Flash</title>
	<atom:link href="http://undefined-type.com/category/flash/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>Screendump my Stage</title>
		<link>http://undefined-type.com/2009/11/screendump-my-stage/</link>
		<comments>http://undefined-type.com/2009/11/screendump-my-stage/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 09:48:23 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[screendump]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=601</guid>
		<description><![CDATA[Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.
Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).
So put this PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.</p>
<p>Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).</p>
<p>So put this PHP on a server somewhere.<br />
<code><br />
&lt;?php<br />
$png = $GLOBALS["HTTP_RAW_POST_DATA"];<br />
$name = date('Y-m-d H.i.s');<br />
$filename = $name.'.png';<br />
file_put_contents($filename, $png);<br />
?&gt;<br />
</code></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</div>
</div>
<p>Then you can add this class to you project, required is the adobe core package (<a href="http://code.google.com/p/as3corelib/" target="_blank">http://code.google.com/p/as3corelib/</a>).<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/11/Screendump.as">Download Screendump.as</a></p>
<p>To use it first set the URI and stage<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.stage = <span style="color: #2529fd;">this</span>.stage;<br />
<span style="color: #b20000;"><span style="color: #000000;">Screendump.URI = </span>&#8220;http://localhost:8888/screendump/dump.php&#8221;<span style="color: #000000;">;</span></span></span></p>
<p>After that whenever you need to take a dump, run<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.takeDump();</span></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/11/screendump-my-stage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>AMFPHP Failed Responses from Desktop Applications</title>
		<link>http://undefined-type.com/2009/10/amfphp-failed-responses-from-desktop-applications/</link>
		<comments>http://undefined-type.com/2009/10/amfphp-failed-responses-from-desktop-applications/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 19:08:03 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=565</guid>
		<description><![CDATA[When sending data between Flash to Server I often use the AMFPHP service. It’s a easy to install and rapid way to send data back and forth. A problem I noticed when running a desktop application on PC was that it kept returning errors but from a MAC it worked just fine. The simple solution [...]]]></description>
			<content:encoded><![CDATA[<p>When sending data between Flash to Server I often use the <a href="http://www.amfphp.org/" target="_blank">AMFPHP</a> service. It’s a easy to install and rapid way to send data back and forth. A problem I noticed when running a desktop application on PC was that it kept returning errors but from a MAC it worked just fine. The simple solution is to set the gateway to work as a test server, else the service blocks desktop calls.</p>
<p><strong>Problem:</strong> Desktop application from PC getting errors in responses when MAC works fine.<br />
<strong>Solution:</strong> Open <strong>gateway.php line: 106</strong> and change <strong>PRODUCTION_SERVER</strong> to <strong>false</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/10/amfphp-failed-responses-from-desktop-applications/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>Flash Library Sounds &#8220;break&#8221;</title>
		<link>http://undefined-type.com/2009/07/flash-library-sounds-break/</link>
		<comments>http://undefined-type.com/2009/07/flash-library-sounds-break/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 08:44:12 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[wav]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=563</guid>
		<description><![CDATA[Working in a sound/voice heavy project right now, we keep updating the sound files in the FLA files all the time and they just keep crashing. When playing the sounds in Flash it gets a high pitch noise and is all scramble.
Solution:
Select the files in library and choose UPDATE, then Clear ASO Cache and export [...]]]></description>
			<content:encoded><![CDATA[<p>Working in a sound/voice heavy project right now, we keep updating the sound files in the FLA files all the time and they just keep crashing. When playing the sounds in Flash it gets a high pitch noise and is all scramble.</p>
<p><strong>Solution:</strong><br />
Select the files in library and choose UPDATE, then Clear ASO Cache and export the file. Irritating bug I know but this seems to get my files to play correctly.<br />
<strong>PS:</strong> Adobe Flash CS4 with WAV sounds.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/07/flash-library-sounds-break/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webcam Privacy DENY</title>
		<link>http://undefined-type.com/2009/06/webcam-privacy-deny/</link>
		<comments>http://undefined-type.com/2009/06/webcam-privacy-deny/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 14:33:58 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[reconnect]]></category>
		<category><![CDATA[StatusEvent]]></category>
		<category><![CDATA[try again]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=551</guid>
		<description><![CDATA[Working with a online webcam application and when trying my user-cases I noticed an irritating problem.
When connecting a webcam class to a Video the Privacy settings automaticly appear.
video.attachCamera( camera ); 
But if the user clicks DENY instead of ALLOW you can get into a little problem. My application needs a webcam so what I do is to show [...]]]></description>
			<content:encoded><![CDATA[<p>Working with a online webcam application and when trying my user-cases I noticed an irritating problem.</p>
<p>When connecting a webcam class to a Video the Privacy settings automaticly appear.<br />
<strong>video.attachCamera( camera ); </strong></p>
<p>But if the user clicks <strong>DENY</strong> instead of <strong>ALLOW</strong> you can get into a little problem. My application needs a webcam so what I do is to show the user some copy and telling them to <strong>ALLOW</strong> the webcam or go somewhere else to play.</p>
<p>To check if the first time was allowed or not is easy with <br />
<strong>camera.addEventListener(StatusEvent.STATUS, onCameraStatus);</strong><br />
but this is only triggered first time, event if I create a new Camera and Video class. </p>
<p><strong>Solution</strong><br />
After the first event I set a variable that the user has already got the Privacy window. <strong>IF</strong> the user selects <strong>DENY</strong> and I want to give them another change (after my nice warning window) I do everything <strong>EXACTLY</strong> the same way, <strong>JUST ADD</strong><br />
<strong>Security.showSettings(SecurityPanel.PRIVACY);</strong><br />
If it&#8217;s the next try.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/06/webcam-privacy-deny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Network Links</title>
		<link>http://undefined-type.com/2009/04/social-network-links/</link>
		<comments>http://undefined-type.com/2009/04/social-network-links/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 16:54:10 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[social share]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=524</guid>
		<description><![CDATA[Wanted to post some Social media links on a site that I&#8217;m building but couldn&#8217;t find any good summary information, well, so here we go.

 
 
Facebook
http://www.facebook.com/sharer.php?u=&#8217;+encodeURIComponent(u)+&#8217;&#38;t=&#8217;+encodeURIComponent(t) 
u = url to site
t = title of link

 
 
Delicious
&#8220;http://delicious.com/save?url=&#8221;+u+&#8221;&#38;title=&#8221;+t;
u = url to site
t = title of link
m = metadata for link

 
 
MySpace
&#8220;http://www.myspace.com/Modules/PostTo/Pages/?u=&#8221;+u+&#8221;&#38;sa=2&#38;t=&#8221;+t+&#8221;&#38;c=&#8221; 
u = url to site
t = title of link

 [...]]]></description>
			<content:encoded><![CDATA[<p>Wanted to post some Social media links on a site that I&#8217;m building but couldn&#8217;t find any good summary information, well, so here we go.</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_facebook.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-535" title="share_facebook" src="http://undefined-type.com/wp-content/uploads/2009/04/share_facebook.jpg" alt="share_facebook" width="100" height="38" /></a></p>
<p> </p>
<p><strong> <br />
Facebook</strong></p>
<p>http://www.facebook.com/sharer.php?u=&#8217;+encodeURIComponent(u)+&#8217;&amp;t=&#8217;+encodeURIComponent(t) </p>
<p>u = url to site<br />
t = title of link</p>
<p><strong><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_delicious.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-536" title="share_delicious" src="http://undefined-type.com/wp-content/uploads/2009/04/share_delicious.jpg" alt="share_delicious" width="80" height="24" /></a></strong></p>
<p><strong> </strong></p>
<p> </p>
<p><strong>Delicious</strong><br />
&#8220;http://delicious.com/save?url=&#8221;+u+&#8221;&amp;title=&#8221;+t;<br />
u = url to site<br />
t = title of link<br />
m = metadata for link</p>
<p><strong><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_myspace.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-537" title="share_myspace" src="http://undefined-type.com/wp-content/uploads/2009/04/share_myspace.jpg" alt="share_myspace" width="86" height="29" /></a></strong></p>
<p><strong> </strong></p>
<p> </p>
<p><strong>MySpace</strong><br />
&#8220;http://www.myspace.com/Modules/PostTo/Pages/?u=&#8221;+u+&#8221;&amp;sa=2&amp;t=&#8221;+t+&#8221;&amp;c=&#8221; <br />
u = url to site<br />
t = title of link</p>
<p><strong><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_digg.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-538" title="share_digg" src="http://undefined-type.com/wp-content/uploads/2009/04/share_digg.jpg" alt="share_digg" width="49" height="32" /></a></strong></p>
<p><strong> </strong></p>
<p> </p>
<p><strong>Digg</strong><br />
&#8220;http://digg.com/submit?url=&#8221;+u+&#8221;&amp;title=&#8221;+t+&#8221;&amp;bodytext=&#8221;; <br />
u = url to site<br />
t = title of link</p>
<p><strong><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_twitter.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-539" title="share_twitter" src="http://undefined-type.com/wp-content/uploads/2009/04/share_twitter.jpg" alt="share_twitter" width="88" height="30" /></a></strong></p>
<p><strong> </strong></p>
<p> </p>
<p><strong>Twitter</strong><br />
&#8220;http://twitter.com/home/?status=&#8221;+t+&#8221; &#8220;+u<br />
u = url to site<br />
t = title of link</p>
<p><strong><a href="http://undefined-type.com/wp-content/uploads/2009/04/share_stumble.jpg" rel="lightbox[524]"><img class="alignleft size-full wp-image-540" title="share_stumble" src="http://undefined-type.com/wp-content/uploads/2009/04/share_stumble.jpg" alt="share_stumble" width="32" height="33" /></a></strong></p>
<p><strong> </strong></p>
<p> </p>
<p><strong> <br />
Stumbleupon</strong><br />
&#8220;http://stumbleupon.com/submit?url=&#8221;+u+&#8221;&amp;title=&#8221;+t <br />
u = url to site<br />
t = title of link</p>
<p>Createad a simple js file to use for html pages or why not Flash applications. Send the types; <em>facebook,delicious,myspace,digg,twitter or stumbleupon. </em><br />
<strong> socialShare(type, link, title);</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> socialShare<span style="color: #009900;">&#40;</span>type<span style="color: #339933;">,</span>link<span style="color: #339933;">,</span>title<span style="color: #339933;">,</span>meta<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> shareURL<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> u <span style="color: #339933;">=</span> encodeURIComponent<span style="color: #009900;">&#40;</span>link<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> t <span style="color: #339933;">=</span> encodeURIComponent<span style="color: #009900;">&#40;</span>title<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> m <span style="color: #339933;">=</span> encodeURIComponent<span style="color: #009900;">&#40;</span>meta<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>m<span style="color: #009900;">&#41;</span> m <span style="color: #339933;">=</span> t<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> <span style="color: #CC0000;">626</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> <span style="color: #CC0000;">436</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>type<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;facebook&quot;</span> <span style="color: #339933;">:</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.facebook.com/sharer.php?u=&quot;</span><span style="color: #339933;">+</span>u<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;t=&quot;</span><span style="color: #339933;">+</span>t<span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;delicious&quot;</span> <span style="color: #339933;">:</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://delicious.com/save?url=&quot;</span><span style="color: #339933;">+</span>link<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;title=&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;q=&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;meta=&quot;</span><span style="color: #339933;">+</span>encodeURIComponent<span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;myspace&quot;</span> <span style="color: #339933;">:</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.myspace.com/Modules/PostTo/Pages/?u=&quot;</span><span style="color: #339933;">+</span>link<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;sa=2&amp;amp;t=&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;c=&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;digg&quot;</span> <span style="color: #339933;">:</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://digg.com/submit?url=&quot;</span><span style="color: #339933;">+</span>link<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;title=&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;bodytext=&quot;</span><span style="color: #339933;">;</span>
			w <span style="color: #339933;">=</span> <span style="color: #CC0000;">730</span><span style="color: #339933;">;</span>
			h <span style="color: #339933;">=</span> <span style="color: #CC0000;">550</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;twitter&quot;</span> <span style="color: #339933;">:</span>
			w <span style="color: #339933;">=</span> <span style="color: #CC0000;">760</span><span style="color: #339933;">;</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://twitter.com/home/?status=&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; &quot;</span><span style="color: #339933;">+</span>link
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">&quot;stumbleupon&quot;</span> <span style="color: #339933;">:</span>
			shareURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://stumbleupon.com/submit?url=&quot;</span><span style="color: #339933;">+</span>link<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;amp;title=&quot;</span><span style="color: #339933;">+</span>title
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>shareURL<span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;sharer&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;toolbar=0,status=0,scrollbars=yes,resizable=yes,width=&quot;</span><span style="color: #339933;">+</span>w<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;,height=&quot;</span><span style="color: #339933;">+</span>h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><a href="http://undefined-type.com/wp-content/uploads/2009/04/socialshare.js">Download Social Share javascript</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/04/social-network-links/feed/</wfw:commentRss>
		<slash:comments>2</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>XML in Production (lazy)</title>
		<link>http://undefined-type.com/2009/03/xml-in-production-lazy/</link>
		<comments>http://undefined-type.com/2009/03/xml-in-production-lazy/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 22:46:41 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[combine translation]]></category>
		<category><![CDATA[lazy]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=507</guid>
		<description><![CDATA[I&#8217;m working a lot with international sites and there can often be times where the deadlines are short, customers aren&#8217;t so fast as I wish they where with feedback e.g.
This often messes up translations with XML files. They needs to be resend for changes and as the sites takes interaction you can find that things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working a lot with international sites and there can often be times where the deadlines are short, customers aren&#8217;t so fast as I wish they where with feedback e.g.</p>
<p>This often messes up translations with XML files. They needs to be resend for changes and as the sites takes interaction you can find that things are missing.</p>
<p>Here is a small tip if you are running out of time, make sure your XML structure is simple, as well make sure that you are using unique id attributes. Then you can just combine the XML files and you don&#8217;t really need to go thru hours of copy/paste work.</p>
<p>A small example.<br />
<strong>XML 1</strong><br />
&lt;xml&gt;<br />
&lt;gui&gt;<br />
&lt;item id=&#8221;replay&#8221;&gt;REPLAY&lt;/item&gt;<br />
&lt;item id=&#8221;start&#8221;&gt;START THE GAME&lt;/item&gt;<br />
&lt;/gui&gt;<br />
&lt;/xml&gt;</p>
<p><strong>XML 2</strong><br />
&lt;xml&gt;<br />
&lt;gui&gt;<br />
&lt;item id=&#8221;volumeOff&#8221;&gt;TURN ON VOLUME&lt;/item&gt;<br />
&lt;item id=&#8221;volumeOn&#8221;&gt;TURN OFF VOLUME&lt;/item&gt;<br />
&lt;/gui&gt;<br />
&lt;/xml&gt;</p>
<p>So what I do is just to add on and on and combine the XML;s.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">copy</span>:<span style="color: #0066CC;">XML</span> = levelLoader.<span style="color: #006600;">getXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;data/en.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> copy1:<span style="color: #0066CC;">XML</span> = levelLoader.<span style="color: #006600;">getXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;data/en01.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> copy2:<span style="color: #0066CC;">XML</span> = levelLoader.<span style="color: #006600;">getXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;data/en02.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">copy</span> = <span style="color: #0066CC;">copy</span>.<span style="color: #0066CC;">appendChild</span><span style="color: #66cc66;">&#40;</span>copy1.<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">copy</span> = <span style="color: #0066CC;">copy</span>.<span style="color: #0066CC;">appendChild</span><span style="color: #66cc66;">&#40;</span>copy2.<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> volumeOff : <span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">copy</span>.<span style="color: #006600;">gui</span>.<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">@</span>id==<span style="color: #ff0000;">&quot;volumeOff&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/03/xml-in-production-lazy/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>
	</channel>
</rss>

