<?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; cs4</title>
	<atom:link href="http://undefined-type.com/tag/cs4/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>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>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>Flash CS4</title>
		<link>http://undefined-type.com/2008/12/flash-cs4/</link>
		<comments>http://undefined-type.com/2008/12/flash-cs4/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 10:35:32 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[flash player 10]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=339</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>I finaly got my license of Adobe CS4.

Happy as I was i tried out Flash and some of the new cool features, created a small dynamic draw application and tried out the 3D features (use the knobs, hold and drag mouse). Make sure you have Flash Player 10 installed.
(Please open the article to see the [...]]]></description>
			<content:encoded><![CDATA[<p>I finaly got my license of Adobe CS4.</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2008/12/cs4package-compress.jpg" rel="lightbox[339]"><img class="aligncenter size-medium wp-image-340" title="cs4package-compress" src="http://undefined-type.com/wp-content/uploads/2008/12/cs4package-compress-300x261.jpg" alt="cs4package-compress" width="300" height="261" /></a></p>
<p>Happy as I was i tried out Flash and some of the new cool features, created a small dynamic draw application and tried out the 3D features (use the knobs, hold and drag mouse). Make sure you have Flash Player 10 installed.</p>
<p><small>(Please open the article to see the flash file or player.)</small></p>
<p>As usual, download source here <a href="http://undefined-type.com/wp-content/uploads/2008/12/dynamicdraw.zip">dynamicdraw.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/12/flash-cs4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

