<?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>Turtlebite&#039;s Blog &#187; Utilities &amp; Tips</title>
	<atom:link href="http://blog.turtlebite.com/category/utilities-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.turtlebite.com</link>
	<description>Flash CMS Framework, Fleb Framework, Global Navigation and other ActionScript Stuff</description>
	<lastBuildDate>Thu, 17 Nov 2011 06:01:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Runtime dynamic font loading in AS3</title>
		<link>http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/</link>
		<comments>http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 08:04:44 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Utilities & Tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[as3 runtime dynamic font loading]]></category>
		<category><![CDATA[embed fonts]]></category>
		<category><![CDATA[runtime fonts]]></category>

		<guid isPermaLink="false">http://blog.flashcmsframework.com/?p=1031</guid>
		<description><![CDATA[I know this has been a long discussed topic. And I&#8217;m not going to re-invent the wheel. I have been searching for a long time now and have found many ways to dynamically load fonts at runtime in AS3, there are a lot of good solutions out there. But yesterday I found a font manager [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.turtlebite.com/wp-content/uploads/2010/08/as3_flash_runtime_dynamic_font_loading.jpg"></a><a href="http://blog.turtlebite.com/wp-content/uploads/2010/08/as3_flash_runtime_dynamic_font_loading1.jpg"></a><a href="http://blog.turtlebite.com/wp-content/uploads/2010/08/as3_flash_runtime_dynamic_font_loading2.jpg"><img class="alignleft size-full wp-image-1047" title="as3_flash_runtime_dynamic_font_loading" src="http://blog.turtlebite.com/wp-content/uploads/2010/08/as3_flash_runtime_dynamic_font_loading2.jpg" alt="" width="180" height="130" /></a></p>
<p>I know this has been a long discussed topic. And I&#8217;m not going to re-invent the wheel. I have been searching for a long time now and have found many ways to dynamically load fonts at runtime in AS3, there are a lot of good solutions out there. But yesterday I found a font manager class and WOW, that&#8217;s a really smart method. So all I did was wrapping it in another class, to make the handling even easier. <a href="http://www.turtlebite.com/downloads/dynamicfontloader.zip">Here it is.</a></p>
<p><a href="http://www.thetechlabs.com/tutorials/flash/dynamically-loading-fonts-with-fontloader-and-applying-styles-with-css-stylesheet-in-as3/">You should start with this tutorial</a> for the basic font loader manager class by <a href="http://etcs.ru/">etcs.ru</a> (<a href="http://translate.google.com/translate?hl=de&amp;sl=ru&amp;tl=en&amp;u=http://etcs.ru/blog/as3/fontloader_2/">translated</a>). Excerpt: &#8220;What the fontloader does is reading the swf bytecode and extract all fonts from it and registers it to the flash font class.&#8221;</p>
<p>What I did is creating a wrapper class for this, that makes the handling even easier and traces the CSS output file to the output window in the Flash IDE, so you can just copy it and paste in into a new style.css file.</p>
<p>Here is the code to load the fonts and listen to the events:</p>
<pre class="brush: php;">
import net.kaegi.utils.FontManager;
import net.kaegi.events.FontManagerEvent;
var fontManager:FontManager = new FontManager();
fontManager.addEventListener(FontManagerEvent.LOAD_PROGRESS, onFontManagerLoadProgress, false, 0, true);
fontManager.addEventListener(FontManagerEvent.LOAD_COMPLETE, onFontManagerLoadComplete, false, 0, true);
fontManager.addEventListener(FontManagerEvent.LOAD_ERROR, onFontManagerLoadError, false, 0, true);
fontManager.init(&quot;resources/fonts.swf&quot;, &quot;resources/style.css&quot;)

function onFontManagerLoadProgress(event:FontManagerEvent) {
	trace(&quot;FontManager LOAD Progress... &quot;+event.params.type+&quot;: &quot;+event.params.perc+&quot;% (&quot;+event.params.bytesLoaded +&quot;/&quot;+event.params.bytesTotal+&quot;)&quot;);
}
function onFontManagerLoadComplete(event:FontManagerEvent) {
	trace(&quot;FontManager LOAD Complete!&quot;);
	trace(event.params.displayFonts);
	trace(event.params.cssFileOutput);
}
function onFontManagerLoadError(event:FontManagerEvent) {
	trace(&quot;FontManager LOAD Error!&quot;);
	trace(event.params.msg);
}
</pre>
<p>Here is the output of the css trace, ready to use: You can copy and paste it into a new style.css file, then edit it to your needs.</p>
<pre class="brush: css;">
.font1 {
	font-family: &quot;Verdana&quot;;
	font-size: 12;
	color: #000000;
	/*font-weight: normal;*/
	/*font-style: normal;*/
	/*display: inline; /*inline, block, none
	/*leading: 0;
	/*letter-spacing: 0;
	/*margin-left: 0;
	/*margin-right: 0;*/
	/*text-align: left; /*left, center, right, justify*/
	/*text-decoration: none; /*none, underline*/
	/*text-indent: 0;*/
}

.font2 {
	font-family: &quot;Arial Unicode MS&quot;;
	font-size: 12;
	color: #000000;
	font-weight: bold;
	/*font-style: normal;*/
	/*display: inline; /*inline, block, none
	/*leading: 0;
	/*letter-spacing: 0;
	/*margin-left: 0;
	/*margin-right: 0;*/
	/*text-align: left; /*left, center, right, justify*/
	/*text-decoration: none; /*none, underline*/
	/*text-indent: 0;*/
}

.font3 {
	font-family: &quot;Helvetica CY BoldOblique&quot;;
	font-size: 12;
	color: #000000;
	font-weight: bold;
	font-style: italic;
	/*display: inline; /*inline, block, none
	/*leading: 0;
	/*letter-spacing: 0;
	/*margin-left: 0;
	/*margin-right: 0;*/
	/*text-align: left; /*left, center, right, justify*/
	/*text-decoration: none; /*none, underline*/
	/*text-indent: 0;*/
}
</pre>
<p><a href="http://www.turtlebite.com/downloads/dynamicfontloader.zip">Here are all the source files.</a></p>
<p>Some more useful links and resources about this topic:<br />
<a href="http://etcs.ru/pre/FontLoaderDemo/">http://etcs.ru/pre/FontLoaderDemo/</a><br />
<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><br />
<a href="http://lab.revoke.ca/2010/02/as3-external-font-loading-class/">http://lab.revoke.ca/2010/02/as3-external-font-loading-class/</a><br />
<a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/StyleSheet.html">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/StyleSheet.html</a></p>
<p>Even though I don&#8217;t need it in the font loading method described here, while searching the web I found a nice site to get unicode ranges: <a href="http://www.tillschneidereit.de/unicode_range_tool.html">http://www.tillschneidereit.de/unicode_range_tool.html</a> If you are embedding your founds using the EMBED tag you might find it useful.</p>
<p>OK, now back to daily business!</p>
<p>Cheers,<br />
Christian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3&amp;desc=%0D%0A%0D%0AI%20know%20this%20has%20been%20a%20long%20discussed%20topic.%20And%20I%27m%20not%20going%20to%20re-invent%20the%20wheel.%20I%20have%20been%20searching%20for%20a%20long%20time%20now%20and%20have%20found%20many%20ways%20to%20dynamically%20load%20fonts%20at%20runtime%20in%20AS3%2C%20there%20are%20a%20lot%20of%20good%20solutions%20out%20there.%20But%20yesterday%20I%20found%20a%20font%20manager%20class%20and%20WOW%2C%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;bm_description=Runtime+dynamic+font+loading+in+AS3&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/&amp;title=Runtime+dynamic+font+loading+in+AS3" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Runtime+dynamic+font+loading+in+AS3+-+http://b2l.me/afqzjq&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/runtime-dynamic-font-loading-in-as3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scale Bitmaps without distortion: BitmapSlice9</title>
		<link>http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/</link>
		<comments>http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 07:12:41 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Global Navigation]]></category>
		<category><![CDATA[Utilities & Tips]]></category>
		<category><![CDATA[bitmap scale9]]></category>
		<category><![CDATA[flash global navigation]]></category>

		<guid isPermaLink="false">http://blog.flashcmsframework.com/?p=977</guid>
		<description><![CDATA[I just came across a blog entry by Grant Skinner about BitmapSlice9. This is awesome news for the global navigation. I will check it out and post a sample project soon (ok, as soon as I have time&#8230;) Cheers, Christian Subscribe to the comments for this post? Share this on del.icio.us Digg this! Post this [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-978" title="flash_global_navigation_bitmapslice9" src="http://blog.flashcmsframework.com/wp-content/uploads/2010/04/flash_global_navigation_bitmapslice9.jpg" alt="flash_global_navigation_bitmapslice9" width="180" height="130" /></p>
<p>I just came across a <a href="http://www.gskinner.com/blog/archives/2010/04/bitmapslice9_sc.html">blog entry by Grant Skinner</a> about BitmapSlice9. This is awesome news for the global navigation. I will check it out and post a sample project soon (ok, as soon as I have time&#8230;)</p>
<p>Cheers,<br />
Christian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9&amp;desc=%0D%0A%0D%0AI%20just%20came%20across%20a%20blog%20entry%20by%20Grant%20Skinner%20about%20BitmapSlice9.%20This%20is%20awesome%20news%20for%20the%20global%20navigation.%20I%20will%20check%20it%20out%20and%20post%20a%20sample%20project%20soon%20%28ok%2C%20as%20soon%20as%20I%20have%20time...%29%0D%0A%0D%0ACheers%2C%0D%0AChristian" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;bm_description=Scale+Bitmaps+without+distortion%3A+BitmapSlice9&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/&amp;title=Scale+Bitmaps+without+distortion%3A+BitmapSlice9" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Scale+Bitmaps+without+distortion%3A+BitmapSlice9+-+http://b2l.me/afqzju&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/scale-bitmaps-without-distortion-bitmapslice9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In love with UIScrollbar</title>
		<link>http://blog.turtlebite.com/in-love-with-uiscrollbar/</link>
		<comments>http://blog.turtlebite.com/in-love-with-uiscrollbar/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 19:40:25 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Utilities & Tips]]></category>
		<category><![CDATA[scrollbar]]></category>

		<guid isPermaLink="false">http://blog.flashcmsframework.com/?p=808</guid>
		<description><![CDATA[This post is all about scrolling. I&#8217;m not talking about scrolling text, but scrolling movieclips. Or more precise: scrolling a whole flash website. If you want to do this you have a few choices. If you have read the title of this post you know which is my favoured method&#8230; Use the browser scrollbar This [...]]]></description>
			<content:encoded><![CDATA[<p>This post is all about scrolling. I&#8217;m not talking about scrolling text, but scrolling movieclips. Or more precise: scrolling a whole flash website. If you want to do this you have a few choices. If you have read the title of this post you know which is my favoured method&#8230; <img src='http://blog.turtlebite.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Use the browser scrollbar</strong><br />
This seems to be the obvious choice. I do this sometimes, and if I do I use <a href="http://swffit.millermedeiros.com/">SWFFIT</a>. This is a really good solution, but there is a drawback when you use this method: you can only scroll the flash movie as a whole. This is a problem if you want to keep a background image in your flash movie in place and only scroll part of your site.</p>
<p><strong>Use a scrollpane</strong><br />
Because I prefer to have more control, I used to do the scrolling by using  a scrollpane: I just put the whole flash site into a scrollpane. This works fine, I did this in many sites: <a href="http://www.dlog.ch">dlog.ch</a>, <a href="http://www.marviva.net">marviva.net</a> etc. But it also has drawbacks: I cannot click on anything which is behind the scollpane, and, more annoying: I cannot take control over the scroll amount (at least until today I have not found out how to do it). If the content loaded into the scrollpane contains for example movieclips placed at the far bottom (masks, movieclips placed &#8220;off stage&#8221; as starting positions of animations etc.), this will make the movieclip too big (height). And you are limited to the frame of the scrollpane: The content is always &#8220;inside&#8221; (and therefor masked by) the scrollpane which is not always desired.</p>
<p><strong>Use a third party scrollbar<br />
</strong>Every now and then I like to use the <a href="http://www.flashtuning.net/components/Advanced-Scroll-Bar-AS-3.0_15.html">Advanced Scrollbar</a> from <a href="http://flashtuning.net/">flashtuning.net</a> or the <a href="http://www.flashloaded.com/flashcomponents/ultimatescrollerpro/">Ultimate Scroller Pro</a> from <a href="http://www.flashloaded.com">flashloaded.com</a>, but only to scroll &#8220;small things&#8221;.</p>
<p><strong>Take full control with the UIScrollbar!</strong><br />
I always thought that the UIScrollbar was for scrolling text only. How wrong I was! <img src='http://blog.turtlebite.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Today I do all my scrolling with the UIScrollbar, because you can not only scroll textfields, but movieclips as well. And the best thing is: I can precisly control the scroll amounts. Have a look at the SWF below. <a href="http://www.flashcmsframework.com/downloads/uiscrollbar/">Click here to test the mousewheel</a>.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scroll_2035357853"
			class="flashmovie"
			width="595"
			height="400">
	<param name="movie" value="/wp-content/uploads/2009/10/scroll.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2009/10/scroll.swf"
			name="fm_scroll_2035357853"
			width="595"
			height="400">
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img class="alignnone size-full wp-image-826" title="flash_as3_scrolling_movieclips_uiscrollbar" src="http://blog.flashcmsframework.com/wp-content/uploads/2009/10/flash_as3_scrolling_movieclips_uiscrollbar.jpg" alt="flash_as3_scrolling_movieclips_uiscrollbar" width="190" height="140" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>The simple trick is to not assign a scroll target to the scrollbar, but a scroll amount only. Then just listen to the scroll events and scroll whatever you like:</p>
<pre class="brush: php;">
// setScrollProperties(pageSize:Number, minScrollPosition:Number, maxScrollPosition:Number, pageScrollSize:Number = 0):void
var scrollbar_height:uint = 200;
var extra_height:uint = 10;
sb_vertical.setScrollProperties(200, 0, scroll_target.height - scrollbar_height + extra_height, scrollbar_height);
sb_vertical.addEventListener(ScrollEvent.SCROLL, onVerticalScrollHandler);
//
function onVerticalScrollHandler(event:ScrollEvent):void{
scroll_target.y = -event.position + sb_vertical.y + 5;
}
</pre>
<p><a href="http://www.turtlebite.com/downloads/uiscrollbar/uiscrollbar.zip">Download the source files here</a>. I have also included the files needed to enable <a href="http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/">mouse wheel scrolling on the mac</a>.</p>
<p><em><strong>Update 2009/12/01</strong></em>: <a href="http://www.turbohomepage.ch">Here is a real example</a> of a website using the UI Scrollbar for full site scrolling.</p>
<p>Happy scrolling!<br />
Christian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/in-love-with-uiscrollbar/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar&amp;desc=This%20post%20is%20all%20about%20scrolling.%20I%27m%20not%20talking%20about%20scrolling%20text%2C%20but%20scrolling%20movieclips.%20Or%20more%20precise%3A%20scrolling%20a%20whole%20flash%20website.%20If%20you%20want%20to%20do%20this%20you%20have%20a%20few%20choices.%20If%20you%20have%20read%20the%20title%20of%20this%20post%20you%20know%20which%20is%20my%20favoured%20method...%20%3A-%29%0D%0A%0D%0AUse%20the%20browser%20sc" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;bm_description=In+love+with+UIScrollbar&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/in-love-with-uiscrollbar/&amp;title=In+love+with+UIScrollbar" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/in-love-with-uiscrollbar/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=In+love+with+UIScrollbar+-+http://b2l.me/afq663&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/in-love-with-uiscrollbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multipage printing class for AS3</title>
		<link>http://blog.turtlebite.com/multipage-printing-class-for-as3/</link>
		<comments>http://blog.turtlebite.com/multipage-printing-class-for-as3/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 14:26:34 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Utilities & Tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Fleb Framework]]></category>
		<category><![CDATA[multipage]]></category>
		<category><![CDATA[print class]]></category>
		<category><![CDATA[printjob]]></category>

		<guid isPermaLink="false">http://www.flashcmsframework.com/?p=409</guid>
		<description><![CDATA[A little off topic, but it is something I have been in need of for a long time: multipage printing. I&#8217;ve been searching  to find a class for AS3 that does this, but I have only found instructions and basic explanations on how to use the printjob class of AS3. So I used to tell [...]]]></description>
			<content:encoded><![CDATA[<p>A little off topic, but it is something I have been in need of for a long time: multipage printing. I&#8217;ve been searching  to find a class for AS3 that does this, but I have only found instructions and basic explanations on how to use the printjob class of AS3. So I used to tell my clients, uuh, printing is quite difficult in flash and they were always brave and I could skip it. But it has become more and more demanded and so I have created my own class. You can download it for free. Any feedback is highly appreciated! <img src='http://blog.turtlebite.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <span id="more-409"></span></p>
<h5>How does it work?</h5>
<p>It takes the content (movieclip or sprite), resizes it (keeping its aspect ratio) so that the width fits to the width of the selected paper format (landscape or portrait) and calculates the number of pages.</p>
<p><img class="alignnone size-full wp-image-411" title="Multipage print class AS3" src="http://www.flashcmsframework.com/wp-content/uploads/overview1.jpg" alt="Multipage print class AS3" width="595" height="500" /></p>
<h5>Try it out in the SWF below:</h5>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_print_1421684405"
			class="flashmovie"
			width="595"
			height="500">
	<param name="movie" value="http://blog.turtlebite.com/wp-content/data/as3_print/print.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://blog.turtlebite.com/wp-content/data/as3_print/print.swf"
			name="fm_print_1421684405"
			width="595"
			height="500">
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>You can find the <a href="http://www.turtlebite.com/docs/doku.php#multipage_printing">documentation and download of all source files here.</a></p>
<p><a href="http://www.turbohomepage.ch">Here is a real example</a> that makes use of the multipage printing class.</p>
<p>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/multipage-printing-class-for-as3/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3&amp;desc=A%20little%20off%20topic%2C%20but%20it%20is%20something%20I%20have%20been%20in%20need%20of%20for%20a%20long%20time%3A%20multipage%20printing.%20I%27ve%20been%20searching%C2%A0%20to%20find%20a%20class%20for%20AS3%20that%20does%20this%2C%20but%20I%20have%20only%20found%20instructions%20and%20basic%20explanations%20on%20how%20to%20use%20the%20printjob%20class%20of%20AS3.%20So%20I%20used%20to%20tell%20my%20clients%2C%20uuh%2C%20prin" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;bm_description=Multipage+printing+class+for+AS3&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/multipage-printing-class-for-as3/&amp;title=Multipage+printing+class+for+AS3" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/multipage-printing-class-for-as3/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Multipage+printing+class+for+AS3+-+http://b2l.me/afuwx4&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/multipage-printing-class-for-as3/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Send and load variables with AS3 and PHP</title>
		<link>http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/</link>
		<comments>http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:05:45 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Utilities & Tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash php]]></category>
		<category><![CDATA[send load variables]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.flashcmsframework.ch/?p=49</guid>
		<description><![CDATA[Because I use this all the time I decided to put the handling of loading variables with AS3 and PHP in a handy little class. The usage is really simple: new VarLoader(&#34;yourscript.php&#34;,{var1:value1, var2:value2}) But before explaining everything in detail, lets look at this example: 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_varloader_1976787163"
			class="flashmovie"
			width="595"
			height="480">
	<param name="movie" value="/wp-content/data/varloader/varloader.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/data/varloader/varloader.swf"
			name="fm_varloader_1976787163"
			width="595"
			height="480">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> The complete AS3 code [...]]]></description>
			<content:encoded><![CDATA[<p>Because I use this all the time I decided to put the handling of loading variables with AS3 and PHP in a handy little class. The usage is really simple:<span id="more-49"></span></p>
<p><code>
<pre class="brush: php;">new VarLoader(&quot;yourscript.php&quot;,{var1:value1, var2:value2})</pre>
<p></code></p>
<p>But before explaining everything in detail, lets look at this example:<strong><br />
</strong></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_varloader_1135122141"
			class="flashmovie"
			width="595"
			height="480">
	<param name="movie" value="/wp-content/data/varloader/varloader.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/data/varloader/varloader.swf"
			name="fm_varloader_1135122141"
			width="595"
			height="480">
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img class="alignnone size-full wp-image-731" title="flash-as3-php-send-load-variables" src="http://blog.flashcmsframework.com/wp-content/uploads/2009/02/flash-as3-php-send-load-variables.jpg" alt="flash-as3-php-send-load-variables" width="190" height="140" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>The complete AS3 code in varloader.swf:</p>
<pre class="brush: php;">
import net.kaegi.loaders.VarLoader;
var vl:VarLoader;
//
sendBtn.addEventListener(MouseEvent.CLICK,sendBtnHandler);
function sendBtnHandler(e:MouseEvent) {
// Variables sent by POST-Method:
var varObj:Object = {};
varObj.textinput0 = escape(textinput0.text);
varObj.textinput1 = escape(textinput1.text);
// additionally another variable is sent by the GET method:
vl = new VarLoader(&quot;http://www.flashcmsframework.ch/wp-content/data/varloader/varloader.php?var_get=I was sent by GET!&quot;, varObj);
vl.addEventListener(Event.COMPLETE, onVarsLoaded);
vl.addEventListener(Event.CANCEL, onVarsCancel);
}
function onVarsLoaded(e:Event) {
var msg:String = &quot;Communication with the server was successful.\n\n&quot;;
msg += &quot;bulla -&gt; &quot;+e.target.vars.bulla+&quot;\n&quot;;
msg += &quot;gogull -&gt; &quot;+unescape(e.target.vars.gogull)+&quot;\n&quot;;
msg += &quot;var33 -&gt; &quot;+unescape(e.target.vars.var33)+&quot;\n&quot;;
msg += &quot;var_get -&gt; &quot;+unescape(e.target.vars.var_get)+&quot;\n&quot;;
msg += &quot;textinput0 -&gt; &quot;+unescape(e.target.vars.textinput0)+&quot;\n&quot;;
msg += &quot;textinput1 -&gt; &quot;+unescape(e.target.vars.textinput1)+&quot;\n&quot;;
tf_servermsg.textColor = 0x009900;
tf_servermsg.text = msg;
}
function onVarsCancel(e:Event) {
tf_servermsg.textColor = 0x990000;
tf_servermsg.text = e.target.errormsg;
}
</pre>
<p>&#8230;and the code in varloader.php:</p>
<pre class="brush: php;">

// coming from flash (GET)
$var_get = $_GET[&quot;var_get&quot;];

// coming from flash (POST)
$textinput0 = $_POST[&quot;textinput0&quot;];
$textinput1 = $_POST[&quot;textinput1&quot;];

// internal
$bulla = &quot;Blabla. I am just some lonely text.....&quot;;
$gogull = &quot;WOW! I was fetched from the server as well! Cool!&quot;;
$var33 = &quot;Hey, my name is 'var33'! What's yours?&quot;;

// result:
$result = &quot;foo=bar&quot;;     // In AS3 the first variable MUST NOT have an '&amp;', otherwise you will get an error message! So just use some dummy vars to make flash happy.
$result .= &quot;&amp;bulla=&quot;.rawurlencode($bulla);
$result .= &quot;&amp;gogull=&quot;.rawurlencode($gogull);
$result .= &quot;&amp;var33=&quot;.rawurlencode($var33);
$result .= &quot;&amp;var_get=&quot;.rawurlencode($var_get);
$result .= &quot;&amp;textinput0=&quot;.rawurlencode($textinput0);
$result .= &quot;&amp;textinput1=&quot;.rawurlencode($textinput1);

echo $result;

?&gt;;
</pre>
<p><a href="http://blog.turtlebite.com/wp-content/data/varloader/varloader.zip">Download source code and example file</a></p>
<p>I hope someone can use this!</p>
<p><strong>Update 12/28/2009: Some useful links regarding url encoding:</strong><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#escape()">escape()</a><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#unescape()">unescape()</a><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#encodeURI()">encodeURI()</a><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#encodeURIComponent()">encodeURIComponent()</a><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#decodeURI()">decodeURI()</a><br />
<a href="http://help.adobe.com/en_US/AIR/1.1/jslr/package.html#decodeURIComponent()">decodeURIComponent()</a></p>
<p>Cheers,<br />
Christian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP&amp;desc=Because%20I%20use%20this%20all%20the%20time%20I%20decided%20to%20put%20the%20handling%20of%20loading%20variables%20with%20AS3%20and%20PHP%20in%20a%20handy%20little%20class.%20The%C2%A0usage%20is%20really%20simple%3A%0D%0A%0D%0A%5Bcode%20lang%3D%22php%22%5Dnew%20VarLoader%28%26quot%3Byourscript.php%26quot%3B%2C%7Bvar1%3Avalue1%2C%20var2%3Avalue2%7D%29%5B%2Fcode%5D%0D%0A%0D%0A%0D%0A%0D%0ABut%20before%20explaining%20everything%20in%20detail%2C" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;bm_description=Send+and+load+variables+with+AS3+and+PHP&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/&amp;title=Send+and+load+variables+with+AS3+and+PHP" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Send+and+load+variables+with+AS3+and+PHP+-+http://b2l.me/afqp84&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/send-and-load-variables-with-as3-and-php/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>

