<?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>All I don&#039;t know &#187; How To&#8230;</title>
	<atom:link href="http://blog.derraab.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.derraab.com</link>
	<description>About Flash™, Flex™, software development and my computer. And JavaScript.</description>
	<lastBuildDate>Sat, 26 Nov 2011 18:31:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Set WP-Syntax tab width</title>
		<link>http://blog.derraab.com/2011/02/01/set-wp-syntax-tab-width/</link>
		<comments>http://blog.derraab.com/2011/02/01/set-wp-syntax-tab-width/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 14:42:50 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[How To...]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=480</guid>
		<description><![CDATA[Since I&#8217;m using the WP-Syntax plug-in on my blog I tried to optimize font size and the tab width. Like a lot of developers I heavily use tabs in my source code. These tabs are really wide within the browser &#8230; <a href="http://blog.derraab.com/2011/02/01/set-wp-syntax-tab-width/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m using the WP-Syntax plug-in on my blog I tried to optimize font size and the tab width. Like a lot of developers I heavily use tabs in my source code. These tabs are really wide within the browser so I was looking for a way to minimize the used space.</p>
<p>I&#8217;m not a CSS guy but it seems like there is no way to set a specific tab width. So why not replace the tab with white space?</p>
<p>My change to wp-syntax/wp-syntax.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wp_syntax_highlight<span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_syntax_matches</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$match</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_syntax_matches</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$language</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$line</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$escaped</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$code</span> <span style="color: #339933;">=</span> wp_syntax_code_trim<span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// INSERT JUST THIS LINE OF CODE</span>
    <span style="color: #000088;">$code</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'    '</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">'   '</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$code</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">.</span>
    <span style="color: #339933;">.</span>
    <span style="color: #339933;">.</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/02/01/set-wp-syntax-tab-width/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazing Math Tutorial Video Site</title>
		<link>http://blog.derraab.com/2010/10/02/amazing-math-tutorial-video-site/</link>
		<comments>http://blog.derraab.com/2010/10/02/amazing-math-tutorial-video-site/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 08:16:08 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[How To...]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=417</guid>
		<description><![CDATA[I really need to quote this bit-101 blog post. It&#8217;s the first time I heard about that great website: http://www.khanacademy.org/ I don’t have much more to say about this. Do you need to learn or brush up on any subject &#8230; <a href="http://blog.derraab.com/2010/10/02/amazing-math-tutorial-video-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I really need to quote this <a href="http://www.bit-101.com/blog/?p=2861">bit-101 blog post</a>.<br />
It&#8217;s the first time I heard about that great website:</p>
<blockquote><p><a href="http://www.khanacademy.org/">http://www.khanacademy.org/</a></p>
<p>I don’t have much more to say about this. Do you need to learn or brush up on any subject related to math? You will find a wealth of data here in a massive number of videos, each 10 minutes or under. Seriously, anything you want to learn is here, from the basics to advanced calculus. Where does this guy find the time?</p>
<p>I got the link from Brook Andrus’ site, where she gives a bit more info on the author. Pretty amazing guy.</p>
<p><a href="http://www.brooksandrus.com/blog/2010/10/01/the-wrath-of-khan-the-genesis-of-21st-century-education">http://www.brooksandrus.com/blog/2010/10/01/the-wrath-of-khan-the-genesis-of-21st-century-education</a></p></blockquote>
<p>UPDATE: There&#8217;s another one: <a href="http://patrickjmt.com/">http://patrickjmt.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/10/02/amazing-math-tutorial-video-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFK10 &#8211; Flashforum conference notes</title>
		<link>http://blog.derraab.com/2010/04/20/ffk10-flashforum-conference-notes/</link>
		<comments>http://blog.derraab.com/2010/04/20/ffk10-flashforum-conference-notes/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 12:59:10 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[iPhone / iPad]]></category>
		<category><![CDATA[Librarys]]></category>
		<category><![CDATA[Utils]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=207</guid>
		<description><![CDATA[Every year I spend two days sitting in the audience of the Flashforum conference (FFK) listening to great speakers and getting impressed by their experiments and thoughts. It&#8217;s also a good way to renew some of the basic knowledge in &#8230; <a href="http://blog.derraab.com/2010/04/20/ffk10-flashforum-conference-notes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Every year I spend two days sitting in the audience of the Flashforum conference (FFK) listening to great speakers and getting impressed by their experiments and thoughts. It&#8217;s also a good way to renew some of the basic knowledge in Flash development and of course to meet some friends in the Flash scene.</p>
<p>So this are most of my notes:</p>
<p><strong>Flash / Flex development:</strong></p>
<ul>
<li>
Jessee Freemans <a href="http://flaremulator.flashartofwar.com/">Flash Augmented Reality Debug Tool</a> provides an easy way to start with augmented reality development.
</li>
<li>
Use stunning <a href="http://www.hypeframework.org/">Hype-Framework</a> effects.
</li>
<li>
Dive into dynamic sound generation with André Michelles <a href="http://files.andre-michelle.com/AudioSandbox.zip">Audio-Sandbox</a>.
</li>
<li>
Have a look at the <a href="http://pushbuttonengine.com/">PushButton-Engine</a> for component based development.
</li>
<li>
Remember that Flex 4 includes a lot of performance features! It&#8217;s highly recommended to switch as soon as possible. For example the Embed-tag reduces PNG file size and lots of improvements are made within the Flex components.
</li>
<li>
Watch the Adobe TV video preview: <a href="http://tv.adobe.com/watch/max-2009-develop/preview-flex-for-mobile-devices">Flex for mobile devices</a>
</li>
<li>
See Christian Cantrell&#8217;s blogpost <a href="http://blogs.adobe.com/cantrell/archives/2010/04/one_application_five_screens.html">One Application , Five Screens (Including the iPad)</a>
</li>
<li>
Great tip: <a href="http://www.bytearray.org/?p=290">ByteArray.org &#8211; Why cacheAsBitmap is bad</a>
</li>
<li>
Adobe&#8217;s <a href="http://help.adobe.com/en_US/as3/mobile/index.html">Mobile Development Guide for the Flash platform</a> (applies also to desktop applications) contains performance tips like:</p>
<ul>
<li>
<code>DisplayObject.width / height</code> should be divisible by 2 as often as possible
</li>
<li>
Try to avoid <code>Event</code>s and / or stop propagation as soon as possible
</li>
<li>
Set <code>DisplayObject.mouseEnabled=false</code> if possible
</li>
<li>
Stop <code>MovieClip</code> animations when removed from stage
</li>
<li>
Use <code>TextField.opaqueBackground=true</code> if possible
</li>
<li>
Use <code>final</code> statement (<code>final class ClassName {}</code>)
</li>
<li>
Use <code>BitmapData.get / setVector()</code>
</ul>
</li>
</ul>
<p><strong>HTML / JavaScript basics:</strong></p>
<ul>
<li>
Use &#8220;Sprites&#8221; with HTML / CSS (load only one bitmap graphic containing all the asset images for your page and show only the particular relevant parts) and preload next page assets using AJAX while your current page is idle.
</li>
<li>
Since usually only 2 simultaneous domain http requests are supported by browsers it&#8217;s a good practice to distribute contents from various ip addresses (use asset-servers for example).
</li>
<li>
Load only visible parts of your site using JavaScript viewport events.
</li>
</ul>
<p><strong>Useful workflow utils:</strong></p>
<ul>
<li>
<a href="http://www.subversion-server.com/">Subversion Server</a> &#8211; Hosting
</li>
<li>
<a href="http://www.omnigroup.com/products/omnifocus/">Omni Focus</a> &#8211; Personal task management
</li>
<li>
<a href="http://en.wikipedia.org/wiki/Planning_poker">Planning Poker</a> &#8211; Consensus-based estimation technique for estimating
</li>
<li>
<a href="http://www.pivotaltracker.com/">Pivotal Tracker</a> &#8211; Agile project management tool
</li>
<li>
<a href="http://www.ideo.com/news/method-card-iphone-application/">IDEO Method Cards</a> &#8211; iPhone application
</li>
<li>
<a href="http://basecamphq.com/">Basecamp</a> &#8211; Get projects done
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/04/20/ffk10-flashforum-conference-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Embed fonts with Adobe Flash IDE</title>
		<link>http://blog.derraab.com/2010/04/10/embed-fonts-with-adobe-flash-ide/</link>
		<comments>http://blog.derraab.com/2010/04/10/embed-fonts-with-adobe-flash-ide/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 23:05:38 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[How To...]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=161</guid>
		<description><![CDATA[Almost every Flash project needs some embedded fonts and it is a good practice to compile the fonts into a separate SWF file. So here is a simple way to create a file that contains only embedded fonts. The SWF &#8230; <a href="http://blog.derraab.com/2010/04/10/embed-fonts-with-adobe-flash-ide/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Almost every Flash project needs some embedded fonts and it is a good practice to compile the fonts into a separate SWF file. So here is a simple way to create a file that contains only embedded fonts. The SWF file will also show the exact internal font names:</p>
<ol>
<li>Copy and paste the ActionScript code below into the first keyframe of your timeline.</li>
<li>Create new fonts in flash library and export them for ActionScript.<br />
A good tutorial can be found <a href="http://www.adobe.com/devnet/flash/quickstart/embedding_fonts/">here</a>.</li>
<li>Run ONLY the code for step 2 to evalute and trace the exact font names.</li>
<li>Assign the exact font names to the actual library symbols and their export class name.</li>
<li>Run ONLY the code for step 4 to export the swf.</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Security.<span style="color: #0066CC;">allowDomain</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Step 1: Create new fonts in flash library</span>
<span style="color: #808080; font-style: italic;">//         and select &quot;Export for ActionScript&quot;.</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">// Step 2: Run ONLY this code to evalute and trace the exact font names.</span>
<span style="color: #808080; font-style: italic;">/**/</span>
<span style="color: #000000; font-weight: bold;">var</span> embeddedFonts : <span style="color: #0066CC;">Array</span> = <span style="color: #0066CC;">Font</span>.<span style="color: #006600;">enumerateFonts</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> c : uint = embeddedFonts.<span style="color: #0066CC;">length</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">font</span> : <span style="color: #0066CC;">Font</span> = embeddedFonts<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> as <span style="color: #0066CC;">Font</span>;
    <span style="color: #000000; font-weight: bold;">var</span> className : <span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontName</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> lowerFontStyle : <span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontStyle</span>.<span style="color: #0066CC;">toLowerCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> lowerFontStyle.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;bold&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> className += <span style="color: #ff0000;">&quot;Bold&quot;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> lowerFontStyle.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;italic&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> className += <span style="color: #ff0000;">&quot;Italic&quot;</span>;
&nbsp;
    <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> className <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// Step 3: Assign the exact font names to the actual</span>
<span style="color: #808080; font-style: italic;">//         library symbols and their export class name.</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">// Step 4: Export the swf using ONLY this code. </span>
<span style="color: #808080; font-style: italic;">/**/</span>
<span style="color: #000000; font-weight: bold;">var</span> posX : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
<span style="color: #000000; font-weight: bold;">var</span> posY : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> embeddedFonts : <span style="color: #0066CC;">Array</span> = <span style="color: #0066CC;">Font</span>.<span style="color: #006600;">enumerateFonts</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #66cc66;">&#41;</span>;
    embeddedFonts.<span style="color: #0066CC;">sortOn</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;fontName&quot;</span>, <span style="color: #0066CC;">Array</span>.<span style="color: #006600;">CASEINSENSITIVE</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> c : uint = embeddedFonts.<span style="color: #0066CC;">length</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">font</span> : <span style="color: #0066CC;">Font</span> = embeddedFonts<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> as <span style="color: #0066CC;">Font</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> lowerFontStyle : <span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontStyle</span>.<span style="color: #0066CC;">toLowerCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">textFormat</span> : <span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">bold</span> = <span style="color: #66cc66;">&#40;</span> lowerFontStyle.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;bold&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">italic</span> = <span style="color: #66cc66;">&#40;</span> lowerFontStyle.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;italic&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">font</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontName</span>;
        <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">14</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> className : <span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontName</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">bold</span> <span style="color: #66cc66;">&#41;</span> className += <span style="color: #ff0000;">&quot;Bold&quot;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">italic</span> <span style="color: #66cc66;">&#41;</span> className += <span style="color: #ff0000;">&quot;Italic&quot;</span>;
&nbsp;
    <span style="color: #0066CC;">Font</span>.<span style="color: #006600;">registerFont</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#40;</span> getDefinitionByName<span style="color: #66cc66;">&#40;</span> className <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> boldItalic : <span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">bold</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">italic</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        boldItalic = <span style="color: #ff0000;">&quot;( needs to be BOLD and ITALIC ! )&quot;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">bold</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        boldItalic = <span style="color: #ff0000;">&quot;( needs to be BOLD ! )&quot;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textFormat</span>.<span style="color: #0066CC;">italic</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        boldItalic = <span style="color: #ff0000;">&quot;( needs to be ITALIC ! )&quot;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">textField</span> : <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>;
        <span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
        <span style="color: #0066CC;">textField</span>.<span style="color: #006600;">defaultTextFormat</span> = <span style="color: #0066CC;">textFormat</span>;
        <span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;
        <span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">font</span>.<span style="color: #006600;">fontName</span> + <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> + boldItalic;
        <span style="color: #0066CC;">textField</span>.<span style="color: #006600;">x</span> = posX;
        <span style="color: #0066CC;">textField</span>.<span style="color: #006600;">y</span> = posY;
&nbsp;
    posY += <span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">height</span> + <span style="color: #cc66cc;">5</span>;
&nbsp;
    addChild<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">textField</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**/</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/04/10/embed-fonts-with-adobe-flash-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URLRequest with HTTP authentication</title>
		<link>http://blog.derraab.com/2010/02/25/urlrequest-with-http-authentication/</link>
		<comments>http://blog.derraab.com/2010/02/25/urlrequest-with-http-authentication/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 12:14:26 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[How To...]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=123</guid>
		<description><![CDATA[I found a good explanation how to support HTTP authentication with URLRequests here. That&#8217;s the most interesting part: Best I can tell, for some reason, this only works where request method is POST; the headers don&#8217;t get set with GET &#8230; <a href="http://blog.derraab.com/2010/02/25/urlrequest-with-http-authentication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found a good explanation how to support HTTP authentication with URLRequests <a href="http://stackoverflow.com/questions/509219/flex-3-how-to-support-http-authentication-urlrequest">here</a>.</p>
<p>That&#8217;s the most interesting part:</p>
<blockquote><p>
Best I can tell, for some reason, this only works where request method is POST; the headers don&#8217;t get set with GET requests.</p>
<p>Interestingly, it also fails unless at least one URLVariables name-value pair gets packaged with the request, as indicated above. That&#8217;s why many of the examples you see out there (including mine) attach &#8220;name=John+Doe&#8221; &#8212; it&#8217;s just a placeholder for some data that URLRequest seems to require when setting any custom HTTP headers. Without it, even a properly authenticated POST request will also fail.</p>
<p>You&#8217;ll almost surely have to modify your crossdomain.xml file to accommodate the header(s) you&#8217;re going to be sending. In my case, I&#8217;m using this, which is a rather wide-open policy file in that it accepts from any domain, so in your case, you might want to limit things a bit more, depending on how security-conscious you are:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cross-domain-policy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;allow-access-from</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;allow-http-request-headers-from</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">headers</span>=<span style="color: #ff0000;">&quot;Authorization&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cross-domain-policy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>&#8230; and that seems to work; more information on this one is available from Adobe <a href="http://kb2.adobe.com/cps/403/kb403185.html">here</a>).</p>
<p>Apparently, Flash player version 9.0.115.0 completely blocks all Authorization headers (more information on this one <a href="http://kb2.adobe.com/cps/403/kb403184.html">here</a>), so you&#8217;ll probably want to keep that in mind, too.
</p></blockquote>
<p>So this little code snippet explains the basics:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Base64Encoder contained in Flex SDK</span>
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Base64Encoder</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Encode username and password</span>
<span style="color: #000000; font-weight: bold;">var</span> base64Encoder : Base64Encoder = <span style="color: #000000; font-weight: bold;">new</span> Base64Encoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;        
    base64Encoder.<span style="color: #006600;">encode</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;username:password&quot;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Create authorization request header</span>
<span style="color: #000000; font-weight: bold;">var</span> urlRequestHeader : URLRequestHeader = <span style="color: #000000; font-weight: bold;">new</span> URLRequestHeader<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Authorization&quot;</span>, <span style="color: #ff0000;">&quot;Basic &quot;</span> + base64Encoder.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// URLRequest setup</span>
<span style="color: #000000; font-weight: bold;">var</span> urlRequest : URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #66cc66;">&#41;</span>;        
    <span style="color: #808080; font-style: italic;">// Needs to send some data!!        </span>
    urlRequest.<span style="color: #0066CC;">data</span> = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;name=John+Doe&quot;</span> <span style="color: #66cc66;">&#41;</span>;        
    <span style="color: #808080; font-style: italic;">// Only supported with POST method!!        </span>
    urlRequest.<span style="color: #006600;">method</span> = URLRequestMethod.<span style="color: #006600;">POST</span>;        
    <span style="color: #808080; font-style: italic;">// Apply authorization request header        </span>
    urlRequest.<span style="color: #006600;">requestHeaders</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span> urlRequestHeader <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/02/25/urlrequest-with-http-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Custom Flex Components with Flash</title>
		<link>http://blog.derraab.com/2009/04/09/create-custom-flex-components-with-flash/</link>
		<comments>http://blog.derraab.com/2009/04/09/create-custom-flex-components-with-flash/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 16:52:49 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=79</guid>
		<description><![CDATA[I found a Adobe TV Video which contains basic knowledge how to create custom Flex components with Flash CS3:]]></description>
			<content:encoded><![CDATA[<p>I found a Adobe TV Video which contains basic knowledge how to create custom Flex components with Flash CS3:</p>
<p><embed src="http://tv.adobe.com/Embed.swf" quality="high" bgcolor="#000000" width="467" height="300" name="AdobeTVPlayer" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashVars="v=~b64~aHR0cDovL2Fkb2JlLmVkZ2Vib3NzLm5ldC9mbGFzaC9hZG9iZS9hZG9iZXR2Mi91bmRlcl90aGVfaG9vZF93aXRoX2Fkb2JlLzM1X3VoYV8wMDQuZmx2P3Jzc19mZWVkaWQ9MTUzNCZ4bWx2ZXJzPTI=&#038;w=467&#038;t=http://tv.adobe.com/#vi+f1534v1463&#038;h=300"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2009/04/09/create-custom-flex-components-with-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add MouseWheel support on Mac OS Flash Player</title>
		<link>http://blog.derraab.com/2007/10/29/swfobject-add-on-mousewheel-on-mac-os/</link>
		<comments>http://blog.derraab.com/2007/10/29/swfobject-add-on-mousewheel-on-mac-os/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 20:18:14 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[How To...]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/2007/10/29/swfobject-add-on-mousewheel-on-mac-os/</guid>
		<description><![CDATA[Gabriel Bucknail created almost a year ago a SWFObject add-on to bring MouseWheel support to the Mac OS X Flash Player. Seems to be still up to date: AS2-Solution or AS3-Solution]]></description>
			<content:encoded><![CDATA[<p>Gabriel Bucknail created almost a year ago a SWFObject add-on to bring MouseWheel support to the Mac OS X Flash Player. Seems to be still up to date: <a href="http://blog.pixelbreaker.com/2006/11/08/flash/swfmacmousewheel/">AS2-Solution</a> or <a href="http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/">AS3-Solution</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2007/10/29/swfobject-add-on-mousewheel-on-mac-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to embed everything in a Word.doc</title>
		<link>http://blog.derraab.com/2007/10/29/how-to-embed-everything-in-a-worddoc/</link>
		<comments>http://blog.derraab.com/2007/10/29/how-to-embed-everything-in-a-worddoc/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 19:49:07 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[How To...]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Word]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/2007/10/29/how-to-embed-everything-in-a-worddoc/</guid>
		<description><![CDATA[This summer I was getting crazy because I couldn&#8217;t find out how to embed all graphics within a Word document. The idea behind this simply was to bring loads of XML data into Word documents. So I decided to automatically &#8230; <a href="http://blog.derraab.com/2007/10/29/how-to-embed-everything-in-a-worddoc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This summer I was getting crazy because I couldn&#8217;t find out how to embed all graphics within a Word document.</p>
<p>The idea behind this simply was to bring loads of XML data into Word documents. So I decided to automatically create HTML data out of the XML, open it in Word and save it with all it&#8217;s images and related stuff as one single file.</p>
<p>This german <a HREF="http://www.office-loesung.de/ftopic153537_0_0_asc.php"> forum</a> helped me. The solution is quite simple:</p>
<ul>
<li>CTRL (or Apple) + A</li>
<li>CTRL (or Apple) + SHIFT + F9</li>
<li>CTRL (or Apple) + S</li>
</ul>
<p>Microsoft documentations &#8211; pff.</p>
<p>Additional Links:<br />
<a HREF="http://www.joyedaniels.com/keys_word.htm">Word Shortcut Keys</a><br />
<a HREF="http://word.mvps.org/mac/FieldsInMacWord.html">Fields in MacWord</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2007/10/29/how-to-embed-everything-in-a-worddoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

