<?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>Revoke Lab</title>
	<atom:link href="http://lab.revoke.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.revoke.ca</link>
	<description>Flash and web programming ressources, experiments and links.</description>
	<lastBuildDate>Fri, 21 Oct 2011 04:06:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Smash Hits Badminton Beta</title>
		<link>http://lab.revoke.ca/2011/10/smash-hits-badminton-beta/</link>
		<comments>http://lab.revoke.ca/2011/10/smash-hits-badminton-beta/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 04:06:34 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=233</guid>
		<description><![CDATA[Yesterday I lauched my new badminton game, which is still in beta. It&#8217;s now available to the public with a couple of features already available, but with much more to come in the next months, including a much needed online multiplayer mode. With already near 100 users and 200 games played in less than 48 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.revoke.ca/wp-content/uploads/2011/10/preview.jpg"><img src="http://lab.revoke.ca/wp-content/uploads/2011/10/preview.jpg" alt="" title="Smash Hits Badminton" width="550" height="280" class="aligncenter size-full wp-image-234" /></a></p>
<p>Yesterday I lauched my new badminton game, which is still in beta. It&#8217;s now available to the public with a couple of features already available, but with much more to come in the next months, including a much needed online multiplayer mode.</p>
<p>With already near 100 users and 200 games played in less than 48 hours, I hope this will be the game that fills the need of a complete badminton game on the web.</p>
<p>Feel free to come by and try it.</p>
<p><a href="http://shbadminton.com/">Play Smash Hits Badminton Online!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2011/10/smash-hits-badminton-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash &#8211; French Custom Character Embedding</title>
		<link>http://lab.revoke.ca/2010/04/flash-french-custom-character-embedding/</link>
		<comments>http://lab.revoke.ca/2010/04/flash-french-custom-character-embedding/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:44:10 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=201</guid>
		<description><![CDATA[These files contains character sets that you can embed in your dynamic textfields : C:\Program Files\Adobe\Adobe Flash CS4\en\First Run\FontEmbedding\UnicodeTable.xml C:\Users\{user}\AppData\Local\Adobe\Flash CS4\en\Configuration\FontEmbedding\UnicodeTable.xml Add this set of unicode characters to add a French set of characters in the Character Embedding dialog : 123456789101112131415161718192021222324252627282930313233343536&#60;glyphRange name=&#34;French Custom&#34; id=&#34;27&#34;&#62; &#160; &#160; &#60;range min=&#34;0x0020&#34; max=&#34;0x0020&#34;/&#62; &#160; &#160; &#60;range min=&#34;0x00C0&#34; max=&#34;0x00CF&#34;/&#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>These files contains character sets that you can embed in your dynamic textfields :</p>
<p>C:\Program Files\Adobe\Adobe Flash CS4\en\First Run\FontEmbedding\UnicodeTable.xml<br />
C:\Users\{user}\AppData\Local\Adobe\Flash CS4\en\Configuration\FontEmbedding\UnicodeTable.xml</p>
<p>Add this set of unicode characters to add a French set of characters in the Character Embedding dialog :<br />
<span id="more-201"></span></p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;glyphRange</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;French Custom&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;27&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0020&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x0020&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00C0&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00CF&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00D2&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00D6&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00D9&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00DC&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00E0&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00EF&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00F2&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00F6&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00F9&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00FC&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0041&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x005A&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0061&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x007A&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x002E&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x002E&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0020&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x002F&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x003A&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x0040&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x005B&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x0060&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x007B&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x007E&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00ab&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00ab&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00bb&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00bb&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0152&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x0153&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x02c6&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x02c6&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x02dc&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x02dc&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2013&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2014&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2018&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x201a&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x201c&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x201e&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2020&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2022&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2026&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2026&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2030&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2030&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2039&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x203a&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x20ac&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x20ac&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2122&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2122&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x0030&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x0039&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00AE&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00AE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x2122&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x2122&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00AE&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00AE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x3291&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x3291&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;range</span> <span style="color: #000066;">min</span>=<span style="color: #ff0000;">&quot;0x00A0&quot;</span> <span style="color: #000066;">max</span>=<span style="color: #ff0000;">&quot;0x00A0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/glyphRange<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2010/04/flash-french-custom-character-embedding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; Detect when mouse leaves stage</title>
		<link>http://lab.revoke.ca/2010/03/as3-detect-when-mouse-leaves-stage/</link>
		<comments>http://lab.revoke.ca/2010/03/as3-detect-when-mouse-leaves-stage/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 21:42:21 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=196</guid>
		<description><![CDATA[12stage.addEventListener&#40;Event.MOUSE_LEAVE, mouse_offstage&#41;; stage.addEventListener&#40;MouseEvent.MOUSE_MOVE, mouse_onstage&#41;;]]></description>
			<content:encoded><![CDATA[<p></p>
<div class="codecolorer-container actionscript3 blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_LEAVE</span><span style="color: #000066; font-weight: bold;">,</span> mouse_offstage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_MOVE</span><span style="color: #000066; font-weight: bold;">,</span> mouse_onstage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2010/03/as3-detect-when-mouse-leaves-stage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; External Font Loading Class</title>
		<link>http://lab.revoke.ca/2010/02/as3-external-font-loading-class/</link>
		<comments>http://lab.revoke.ca/2010/02/as3-external-font-loading-class/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 16:57:23 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Ressources]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=185</guid>
		<description><![CDATA[There is an easy way of loading external fonts embedded in swf files, using the etcs.ru.utils.FontLoader class. It loads the swf file, extract the font data directly at the bytes level, and register it to the Font class. Here is a great tutorial for using the etcs.ru.utils.FontLoader class : http://www.thetechlabs.com/tutorials/flash/dynamically-loading-fonts-with-fontloader-and-applying-styles-with-css-stylesheet-in-as3/ I&#8217;ve put together a FontManager [...]]]></description>
			<content:encoded><![CDATA[<p>There is an easy way of loading external fonts embedded in swf files, using the <a href="http://etcs.ru/">etcs.ru.utils.FontLoader class</a>. It loads the swf file, extract the font data directly at the bytes level, and register it to the Font class.</p>
<p>Here is a great tutorial for using the etcs.ru.utils.FontLoader class : <a href="http://www.thetechlabs.com/tutorials/flash/dynamically-loading-fonts-with-fontloader-and-applying-styles-with-css-stylesheet-in-as3/">http://www.thetechlabs.com/tutorials/flash/dynamically-loading-fonts-with-fontloader-and-applying-styles-with-css-stylesheet-in-as3/</a></p>
<p>I&#8217;ve put together a FontManager class that manages multiple swf files with this FontLoader class:</p>
<pre>
<div class="codecolorer-container actionscript3 blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> revoke<span style="color: #000066; font-weight: bold;">.</span>ca<span style="color: #000066; font-weight: bold;">.</span>fonts <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> ru<span style="color: #000066; font-weight: bold;">.</span>etcs<span style="color: #000066; font-weight: bold;">.</span>utils<span style="color: #000066; font-weight: bold;">.</span>FontLoader<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Font</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">EventDispatcher</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FontManager <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">EventDispatcher</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _font_loaders<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _data<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _cur_font<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> FontManager<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _font_loaders = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager::init&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _data = <span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> _data<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> font_loader<span style="color: #000066; font-weight: bold;">:</span>FontLoader = <span style="color: #0033ff; font-weight: bold;">new</span> FontLoader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font_loader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PROGRESS</span><span style="color: #000066; font-weight: bold;">,</span> load_progress<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font_loader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> load_complete<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font_loader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> load_error<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _font_loaders<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>font_loader<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loadNext<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> loadNext<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cur_font<span style="color: #000066; font-weight: bold;">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>_cur_font <span style="color: #000066; font-weight: bold;">&gt;</span>= _data<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager::total_load_complete&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _font_loaders<span style="color: #000000;">&#91;</span>_cur_font<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span>_data<span style="color: #000000;">&#91;</span>_cur_font<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> load_progress<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> ratio<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bytesLoaded</span> <span style="color: #009966; font-style: italic;">/ event.bytesTotal + _cur_font) /</span> _data<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager:: PROGRESS : &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> ratio<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> load_error<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager::load_error&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> load_complete<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager::load_complete&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loadNext<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> get_font_list<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> fonts<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> _font_loaders<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> cur_fonts<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = _font_loaders<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>fonts<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">font</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Font</span> <span style="color: #0033ff; font-weight: bold;">in</span> fonts<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Log<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">log</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FontManager:: FONT LOADED : &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">font</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">fontName</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fonts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">splice</span><span style="color: #000000;">&#40;</span>fonts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">,</span> cur_fonts<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> fonts<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
<p>Usage :</p>
<pre>
<div class="codecolorer-container actionscript3 blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #6699cc; font-weight: bold;">var</span> font_data<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;fonts/arial.swf&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;fonts/helvetica.swf&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> font_manager<span style="color: #000066; font-weight: bold;">:</span>FontManager = <span style="color: #0033ff; font-weight: bold;">new</span> FontManager<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
font_manager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> fonts_complete<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
font_manager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PROGRESS</span><span style="color: #000066; font-weight: bold;">,</span> fonts_progress<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
font_manager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> fonts_error<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
font_manager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>font_data<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> fonts_complete<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Fonts Complete : &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> font_manager<span style="color: #000066; font-weight: bold;">.</span>get_font_list<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> fonts_progress<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ProgressEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Fonts Progress : &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bytesLoaded</span> <span style="color: #000066; font-weight: bold;">/</span> event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bytesTotal</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> fonts_error<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Fonts Error&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2010/02/as3-external-font-loading-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Calculating execution time</title>
		<link>http://lab.revoke.ca/2010/01/php-calculating-execution-time/</link>
		<comments>http://lab.revoke.ca/2010/01/php-calculating-execution-time/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:04:35 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=158</guid>
		<description><![CDATA[Here is an easy way of calculating the time elapsed during some script execution in PHP, using microtime() : 12345$exec_start = microtime&#40;true&#41;; // 'true' returns the seconds of type double // ... do stuff echo &#40;microtime&#40;true&#41; - $exec_start&#41; . ' seconds';]]></description>
			<content:encoded><![CDATA[<p>Here is an easy way of calculating the time elapsed during some script execution in PHP, using microtime() :</p>
<pre>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$exec_start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">microtime</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 'true' returns the seconds of type double</span><br />
<br />
<span style="color: #666666; font-style: italic;">// ... do stuff</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">microtime</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$exec_start</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' seconds'</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2010/01/php-calculating-execution-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash AS3 Frameworks and Libraries</title>
		<link>http://lab.revoke.ca/2009/11/flash-as3-frameworks-and-libraries/</link>
		<comments>http://lab.revoke.ca/2009/11/flash-as3-frameworks-and-libraries/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 19:05:42 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Ressources]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=155</guid>
		<description><![CDATA[Here&#8217;s a list of 15 solid frameworks or libraries for Flash. There are a couple more in the comments below. http://blog.activeden.net/resources/15-awesome-actionscript-3-frameworks-to-inspire-your-next-project/]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a list of 15 solid frameworks or libraries for Flash. There are a couple more in the comments below.</p>
<p><a href="http://blog.activeden.net/resources/15-awesome-actionscript-3-frameworks-to-inspire-your-next-project/">http://blog.activeden.net/resources/15-awesome-actionscript-3-frameworks-to-inspire-your-next-project/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2009/11/flash-as3-frameworks-and-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; Loading external font at runtime</title>
		<link>http://lab.revoke.ca/2009/11/as3-loading-external-font-at-runtime/</link>
		<comments>http://lab.revoke.ca/2009/11/as3-loading-external-font-at-runtime/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 19:02:24 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Ressources]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=153</guid>
		<description><![CDATA[Loading external fonts in AS3 projects can be really complicated, and there is not a lot of documentation online, except for a few blog posts for Flex. This article explains in detail how to proceed to load external font files contained in precompiled swf files. The author even provides a FontManager class to easily manage [...]]]></description>
			<content:encoded><![CDATA[<p>Loading external fonts in AS3 projects can be really complicated, and there is not a lot of documentation online, except for a few blog posts for Flex.</p>
<p>This article explains in detail how to proceed to load external font files contained in precompiled swf files. The author even provides a FontManager class to easily manage the font registration once it&#8217;s loaded.</p>
<p><a href="http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2009/11/as3-loading-external-font-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email validation RegEx</title>
		<link>http://lab.revoke.ca/2009/10/email-validation-regex/</link>
		<comments>http://lab.revoke.ca/2009/10/email-validation-regex/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:52:01 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ressources]]></category>
		<category><![CDATA[RegEx]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=149</guid>
		<description><![CDATA[1/[a-z0-9!#$%&#38;'*+/=?^_`{&#124;}~-]+(?:\.[a-z0-9!#$%&#38;'*+/=?^_`{&#124;}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g Found at http://gskinner.com/RegExr/]]></description>
			<content:encoded><![CDATA[<pre>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g</div></td></tr></tbody></table></div>
</pre>
<p>Found at <a href="http://gskinner.com/RegExr/">http://gskinner.com/RegExr/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2009/10/email-validation-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; asfunction equivalent using TextEvent.LINK</title>
		<link>http://lab.revoke.ca/2009/09/as3-asfunction-equivalent-using-texteventlink/</link>
		<comments>http://lab.revoke.ca/2009/09/as3-asfunction-equivalent-using-texteventlink/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 19:24:23 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=142</guid>
		<description><![CDATA[1234567var tf:TextField = new TextField&#40;&#41;; tf.htmlText = &#34;&#60;a href=\&#34;event:my_custom_text\&#34;&#62;This is an HTML link.&#60;/a&#62;&#34;; tf.addEventListener&#40;TextEvent.LINK, tf_link_handler&#41;; function tf_link_handler&#40;event:TextEvent&#41;:void &#123; &#160; &#160; trace&#40;event.text&#41;; // outputs : &#34;my_custom_text&#34; &#125;]]></description>
			<content:encoded><![CDATA[<pre>
<div class="codecolorer-container actionscript3 blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> tf<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextField</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">htmlText</span> = <span style="color: #990000;">&quot;&lt;a href=<span style="">\&quot;</span>event:my_custom_text<span style="">\&quot;</span>&gt;This is an HTML link.&lt;/a&gt;&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">TextEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINK</span><span style="color: #000066; font-weight: bold;">,</span> tf_link_handler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> tf_link_handler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// outputs : &quot;my_custom_text&quot;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2009/09/as3-asfunction-equivalent-using-texteventlink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFAddress 2.3 and SWFObject 2.2 IE 7 Bug</title>
		<link>http://lab.revoke.ca/2009/08/swfaddress-23-and-swfobject-22-ie-7-bug/</link>
		<comments>http://lab.revoke.ca/2009/08/swfaddress-23-and-swfobject-22-ie-7-bug/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 15:49:27 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://lab.revoke.ca/?p=137</guid>
		<description><![CDATA[There seems to be a bug with SWFAddress 2.2 and SWFObject 2.3 in Internet Explorer 7. When using both libraries, the flashvars passed to the SWFObject don&#8217;t go through the swf movie. To overcome this you must revert to either SWFAddress 2.1 or SWFObject 2.2. The issue has been reported to the SWFObject development team and [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a bug with SWFAddress 2.2 and SWFObject 2.3 in Internet Explorer 7.</p>
<p>When using both libraries, the flashvars passed to the SWFObject don&#8217;t go through the swf movie. To overcome this you must revert to either SWFAddress 2.1 or SWFObject 2.2.</p>
<p>The issue has been reported to the SWFObject development team and will be rectified in the next release.</p>
<p><a href="http://code.google.com/p/swfobject/issues/detail?id=338">http://code.google.com/p/swfobject/issues/detail?id=338</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.revoke.ca/2009/08/swfaddress-23-and-swfobject-22-ie-7-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

