<?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>Deviouswork &#187; Labs</title>
	<atom:link href="http://www.deviouswork.com/category/labs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deviouswork.com</link>
	<description>Flash development for hire</description>
	<lastBuildDate>Tue, 18 Oct 2011 13:47:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>URLShortener package</title>
		<link>http://www.deviouswork.com/2009/09/17/urlshortener-package/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=urlshortener-package</link>
		<comments>http://www.deviouswork.com/2009/09/17/urlshortener-package/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:04:12 +0000</pubDate>
		<dc:creator>Joakim Roos</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Bit.ly]]></category>
		<category><![CDATA[Is.gd]]></category>
		<category><![CDATA[J.mp]]></category>
		<category><![CDATA[Tr.im]]></category>
		<category><![CDATA[URL-shorteners]]></category>

		<guid isPermaLink="false">http://www.deviouswork.com/?p=376</guid>
		<description><![CDATA[Services included at the moment: Bit.ly (BitlyService) J.mp (JmpService) Is.gd (IsgdService) Tr.im (TrimService); ?View Code AS3&#160; import com.deviouswork.http.url.*; &#160; var us:URLShortener = new URLShortener&#40;BitlyService&#41;; &#160; //Only needed for Bit.ly and J.mp us.service.version = '2.0.1'; us.service.login = 'bitlyapidemo'; us.service.key = 'R_0da49e0a9118ff35f52f629d2d71bf07'; //End Bit.ly/J.mp part &#160; us.shorten&#40;'http://www.deviouswork.com/labs/'&#41;; us.addEventListener&#40;Event.COMPLETE, complete, false, 0, true&#41;; &#160; function complete&#40;event:Event&#41;:void &#123; us.removeEventListener&#40;Event.COMPLETE, [...]]]></description>
			<content:encoded><![CDATA[<p>Services included at the moment:<br />
Bit.ly (BitlyService)<br />
J.mp	(JmpService)<br />
Is.gd (IsgdService)<br />
Tr.im (TrimService);</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p376code2'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3762"><td class="code" id="p376code2"><pre class="as3" style="font-family:monospace;">&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>deviouswork<span style="color: #000066; font-weight: bold;">.</span>http<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> us<span style="color: #000066; font-weight: bold;">:</span>URLShortener = <span style="color: #0033ff; font-weight: bold;">new</span> URLShortener<span style="color: #000000;">&#40;</span>BitlyService<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//Only needed for Bit.ly and J.mp </span>
us<span style="color: #000066; font-weight: bold;">.</span>service<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">version</span> = <span style="color: #990000;">'2.0.1'</span><span style="color: #000066; font-weight: bold;">;</span>
us<span style="color: #000066; font-weight: bold;">.</span>service<span style="color: #000066; font-weight: bold;">.</span>login = <span style="color: #990000;">'bitlyapidemo'</span><span style="color: #000066; font-weight: bold;">;</span>
us<span style="color: #000066; font-weight: bold;">.</span>service<span style="color: #000066; font-weight: bold;">.</span>key = <span style="color: #990000;">'R_0da49e0a9118ff35f52f629d2d71bf07'</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">//End Bit.ly/J.mp part</span>
&nbsp;
us<span style="color: #000066; font-weight: bold;">.</span>shorten<span style="color: #000000;">&#40;</span><span style="color: #990000;">'http://www.deviouswork.com/labs/'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
us<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> <span style="color: #004993;">complete</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">complete</span><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>
	us<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</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> <span style="color: #004993;">complete</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>us<span style="color: #000066; font-weight: bold;">.</span>shortURL<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>Update</strong><br />
Moved the package over to Github<br />
<a href="http://github.com/deviouswork/URLshortener">http://github.com/deviouswork/URLshortener</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deviouswork.com/2009/09/17/urlshortener-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slotmachine effect</title>
		<link>http://www.deviouswork.com/2009/07/10/slotmachine-effect/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=slotmachine-effect</link>
		<comments>http://www.deviouswork.com/2009/07/10/slotmachine-effect/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 10:31:40 +0000</pubDate>
		<dc:creator>Joakim Roos</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Effect]]></category>
		<category><![CDATA[One Armed Bandit]]></category>
		<category><![CDATA[Slotmachine]]></category>

		<guid isPermaLink="false">http://www.deviouswork.com/?p=326</guid>
		<description><![CDATA[UPDATE I&#8217;ve uploaded an example with an working FLA 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_slotmachine_1036751796"
			class="flashmovie"
			width="200"
			height="200">
	<param name="movie" value="http://www.deviouswork.com/blog/wp-content/uploads/2009/07/slotmachine.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.deviouswork.com/blog/wp-content/uploads/2009/07/slotmachine.swf"
			name="fm_slotmachine_1036751796"
			width="200"
			height="200">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> (click the swf to replay it) Slotmachine FLA Dependencies &#8211; TweenLite Example: ?View Code AS3var sm:SlotMachine = new SlotMachine&#40;'€15533', font, 35, '0123456789€'&#41;; addChild&#40;sm&#41;; sm.addEventListener&#40;Event.COMPLETE, _complete&#41;; sm.render&#40;&#41;; &#160; function _complete&#40;aEvent:Event&#41;:void &#123; trace&#40;&#34;SlotMachine COMPLETE&#34;&#41;; &#125; ?View Code AS3/** * com.deviouswork.display.effects.SlotMachine [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE<br />
I&#8217;ve uploaded an example with an working FLA<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_slotmachine_875208208"
			class="flashmovie"
			width="200"
			height="200">
	<param name="movie" value="http://www.deviouswork.com/blog/wp-content/uploads/2009/07/slotmachine.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.deviouswork.com/blog/wp-content/uploads/2009/07/slotmachine.swf"
			name="fm_slotmachine_875208208"
			width="200"
			height="200">
	<!--<![endif]-->
		
<p><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><br />
(click the swf to replay it)</p>
<p><a href='http://www.deviouswork.com/blog/wp-content/uploads/2009/07/Slotmachine.zip'>Slotmachine FLA</a><br />
Dependencies &#8211; <a href="http://blog.greensock.com/tweenliteas3/">TweenLite</a></p>
<p>Example:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p326code5'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3265"><td class="code" id="p326code5"><pre class="as3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> sm<span style="color: #000066; font-weight: bold;">:</span>SlotMachine = <span style="color: #0033ff; font-weight: bold;">new</span> SlotMachine<span style="color: #000000;">&#40;</span><span style="color: #990000;">'€15533'</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: #000000; font-weight:bold;">35</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">'0123456789€'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>sm<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
sm<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> _complete<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
sm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">render</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> _complete<span style="color: #000000;">&#40;</span>aEvent<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>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;SlotMachine COMPLETE&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><span id="more-326"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p326code6'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3266"><td class="code" id="p326code6"><pre class="as3" style="font-family:monospace;"><span style="color: #3f5fbf;">/**
 * com.deviouswork.display.effects.SlotMachine
 * @version 1.0.0
 * @author Joakim Roos  - http://www.deviouswork.com
 * Copyright � 2009 Deviouswork. All Rights Reserved.
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the &quot;Software&quot;), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>deviouswork<span style="color: #000066; font-weight: bold;">.</span>display<span style="color: #000066; font-weight: bold;">.</span>effects <span style="color: #000000;">&#123;</span>
	<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>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>greensock<span style="color: #000066; font-weight: bold;">.</span>TweenLite
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>greensock<span style="color: #000066; font-weight: bold;">.</span>plugins<span style="color: #000066; font-weight: bold;">.</span>BlurFilterPlugin<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>greensock<span style="color: #000066; font-weight: bold;">.</span>plugins<span style="color: #000066; font-weight: bold;">.</span>TweenPlugin<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<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;">TimerEvent</span><span style="color: #000066; font-weight: bold;">;</span>
	<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>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.utils</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Timer</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;complete&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * SlotMachine
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> SlotMachine <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> characterRange<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>	<span style="color: #0033ff; font-weight: bold;">return</span> _characterRange_str<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> characterRange<span style="color: #000000;">&#40;</span>aInput_str <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</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>	_characterRange_str = aInput_str<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _characterRange_str <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _slotText_str <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _bcContainer_mc <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _currentChar_int <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> SlotMachine<span style="color: #000000;">&#40;</span>aSlotText<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span>  aFont<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Font</span> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> aSize<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">12</span><span style="color: #000066; font-weight: bold;">,</span> aCharacterRange<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			TweenPlugin<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>BlurFilterPlugin<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			characterRange = aCharacterRange<span style="color: #000066; font-weight: bold;">;</span>
			_slotText_str = aSlotText<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> reverse_str<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = _slotText_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">''</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">reverse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">join</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">''</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</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> = reverse_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> ox<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_bcContainer_mc = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_bcContainer_mc<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">while</span><span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">--</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>				
				<span style="color: #6699cc; font-weight: bold;">var</span> bc<span style="color: #000066; font-weight: bold;">:</span>BitmapCharacter = <span style="color: #0033ff; font-weight: bold;">new</span> BitmapCharacter<span style="color: #000000;">&#40;</span>characterRange<span style="color: #000066; font-weight: bold;">,</span> aSize<span style="color: #000066; font-weight: bold;">,</span> aFont<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span> = <span style="color: #990000;">&quot;BitmapCharacter_&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> reverse_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;_&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				_bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bc<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = ox<span style="color: #000066; font-weight: bold;">;</span>
				bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildByName</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;bmp_&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> reverse_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				ox = bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">+</span> bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">;</span>
				bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildByName</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;bmp_&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> reverse_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> bcMask_mc<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Sprite</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bcMask_mc<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">with</span><span style="color: #000000;">&#40;</span>bcMask_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0x000000<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
			_bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mask</span> = bcMask_mc<span style="color: #000066; font-weight: bold;">;</span>			
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">render</span><span style="color: #000000;">&#40;</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>
&nbsp;
			_currentChar_int = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> chars<span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = characterRange<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> t<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Timer</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Timer</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span> chars<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			t<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">TimerEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TIMER</span><span style="color: #000066; font-weight: bold;">,</span> _updateAnimation<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			t<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">TimerEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TIMER_COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> _endAnimation<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			t<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _updateAnimation<span style="color: #000000;">&#40;</span>aEvent_te<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TimerEvent</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>
&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;">int</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> _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">numChildren</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>				
				<span style="color: #6699cc; font-weight: bold;">var</span> bc<span style="color: #000066; font-weight: bold;">:</span>BitmapCharacter = _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> BitmapCharacter<span style="color: #000066; font-weight: bold;">;</span>	
				<span style="color: #6699cc; font-weight: bold;">var</span>	bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildAt</span><span style="color: #000000;">&#40;</span>_currentChar_int<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
				bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>
				bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:-</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>i<span style="color: #000066; font-weight: bold;">*.</span>1<span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>				
				<span style="color: #000000;">&#125;</span>
				TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bmp<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span>blurFilter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">blurY</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>i<span style="color: #000066; font-weight: bold;">*.</span>1<span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter = bmp<span style="color: #000066; font-weight: bold;">;</span>	
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>_currentChar_int <span style="color: #000066; font-weight: bold;">&lt;</span> characterRange<span style="color: #000066; font-weight: bold;">.</span>length<span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> _currentChar_int<span style="color: #000066; font-weight: bold;">++;</span>
			<span style="color: #0033ff; font-weight: bold;">else</span> _currentChar_int = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _endAnimation<span style="color: #000000;">&#40;</span>aEvent_te<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TimerEvent</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>
			<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;">int</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> _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">numChildren</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>
				<span style="color: #6699cc; font-weight: bold;">var</span> bc<span style="color: #000066; font-weight: bold;">:</span>BitmapCharacter = _bcContainer_mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> BitmapCharacter<span style="color: #000066; font-weight: bold;">;</span>
				TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:-</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> j <span style="color: #000066; font-weight: bold;">&lt;</span> characterRange<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> j<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					<span style="color: #6699cc; font-weight: bold;">var</span> delay_num<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = i<span style="color: #000066; font-weight: bold;">*.</span>1 <span style="color: #000066; font-weight: bold;">+</span> j<span style="color: #000066; font-weight: bold;">*.</span>1<span style="color: #000066; font-weight: bold;">;</span>		
					<span style="color: #6699cc; font-weight: bold;">var</span>	bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = bc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildAt</span><span style="color: #000000;">&#40;</span>j<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
					TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:-</span>bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>delay_num<span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					bc<span style="color: #000066; font-weight: bold;">.</span>currentCharacter = bmp<span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span> == <span style="color: #990000;">&quot;bmp_&quot;</span><span style="color: #000066; font-weight: bold;">+</span> _slotText_str<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
						TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bmp<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> blurFilter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">blurY</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>delay_num<span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>				
						<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
						TweenLite<span style="color: #000066; font-weight: bold;">.</span>to<span style="color: #000000;">&#40;</span>bmp<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0.1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span>blurFilter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">blurY</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>delay_num<span style="color: #000066; font-weight: bold;">,</span> overwrite<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> t<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Timer</span> = aEvent_te<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Timer</span><span style="color: #000066; font-weight: bold;">;</span>
			t<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			t<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">TimerEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TIMER_COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> _endAnimation<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			t = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span>
			TweenLite<span style="color: #000066; font-weight: bold;">.</span>delayedCall<span style="color: #000000;">&#40;</span>delay_num<span style="color: #000066; font-weight: bold;">,</span> _dispatchCompleteEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _dispatchCompleteEvent<span style="color: #000000;">&#40;</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>
			<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>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
<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>
<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;">FontStyle</span><span style="color: #000066; font-weight: bold;">;</span>
<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;">TextField</span><span style="color: #000066; font-weight: bold;">;</span>
<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;">TextFieldAutoSize</span><span style="color: #000066; font-weight: bold;">;</span>
<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;">TextFormat</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">internal</span> <span style="color: #9900cc; font-weight: bold;">class</span> BitmapCharacter <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span> 
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> currentCharacter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Bitmap</span> <span style="color: #000000;">&#123;</span>	<span style="color: #0033ff; font-weight: bold;">return</span> _currentCharacter_bitmap<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> currentCharacter<span style="color: #000000;">&#40;</span>aInput_bitmap <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Bitmap</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>	_currentCharacter_bitmap = aInput_bitmap<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _currentCharacter_bitmap <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BitmapCharacter<span style="color: #000000;">&#40;</span>aCharacterRange<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> aSize<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span><span style="color: #000066; font-weight: bold;">,</span> aFont<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Font</span> = <span style="color: #0033ff; font-weight: bold;">null</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>
&nbsp;
		<span style="color: #6699cc; font-weight: bold;">var</span> fmt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextFormat</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextFormat</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">font</span> = <span style="color: #990000;">&quot;_sans&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>aFont<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">font</span> = aFont<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">fontName</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span>aFont<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">fontStyle</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #004993;">FontStyle</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BOLD</span><span style="color: #000066; font-weight: bold;">:</span>
					fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bold</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #004993;">FontStyle</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BOLD_ITALIC</span><span style="color: #000066; font-weight: bold;">:</span>
					fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bold</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
					fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">italic</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #004993;">FontStyle</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ITALIC</span><span style="color: #000066; font-weight: bold;">:</span>
					fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">italic</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">size</span> = aSize<span style="color: #000066; font-weight: bold;">;</span>
		fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">color</span> = 0xFFFFFF<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<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>
		tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
		tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
		tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">autoSize</span> = <span style="color: #004993;">TextFieldAutoSize</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LEFT</span><span style="color: #000066; font-weight: bold;">;</span>
		tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">selectable</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
		tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">defaultTextFormat</span> = fmt<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>aFont<span style="color: #000000;">&#41;</span> tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">embedFonts</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>tf<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>		
&nbsp;
		<span style="color: #6699cc; font-weight: bold;">var</span> i <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = aCharacterRange<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">while</span><span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">--</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = aCharacterRange<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span>tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;auto&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span> = <span style="color: #990000;">&quot;bmp_&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> aCharacterRange<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>tf<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		tf = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span>	
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.deviouswork.com/2009/07/10/slotmachine-effect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ordered Lists in TextField.htmlText</title>
		<link>http://www.deviouswork.com/2009/04/21/ordered-lists-in-textfieldhtmltext/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ordered-lists-in-textfieldhtmltext</link>
		<comments>http://www.deviouswork.com/2009/04/21/ordered-lists-in-textfieldhtmltext/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:21:59 +0000</pubDate>
		<dc:creator>Joakim Roos</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[htmltext]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[ul]]></category>

		<guid isPermaLink="false">http://www.deviouswork.com/?p=240</guid>
		<description><![CDATA[One thing thats kept bugging me with TextField.htmlText was the lack of support for ordered list (&#60;ol&#62;&#60;li&#62;&#60;/li&#62;&#60;/ol&#62;) in a textfield with htmlText applied to it. I decided to write a simple class that strips a html string from the (&#60;ol&#62;&#60;li&#62;&#60;/li&#62;&#60;/ol&#62;) and arrange the list(s) in numerical order with tabs instead. I know this isn&#8217;t the [...]]]></description>
			<content:encoded><![CDATA[<p>One thing thats kept bugging me with TextField.htmlText was the lack of support for ordered list <strong>(&lt;ol&gt;&lt;li&gt;&lt;/li&gt;&lt;/ol&gt;)</strong> in a textfield with htmlText applied to it. I decided to write a simple class that strips a html string from the <strong>(&lt;ol&gt;&lt;li&gt;&lt;/li&gt;&lt;/ol&gt;)</strong> and arrange the list(s) in numerical order with tabs instead. I know this isn&#8217;t the prettiest, but hey it works.<span id="more-240"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p240code8'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2408"><td class="code" id="p240code8"><pre class="as3" style="font-family:monospace;"><span style="color: #3f5fbf;">/**
 * com.deviouswork.util.HTMLUtil
 * @version 1.0.0
 * @author Joakim Roos | j  at deviouswork dot com
 * 
 * Copyright (c) 2009 Deviouswork
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the &quot;Software&quot;), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>deviouswork<span style="color: #000066; font-weight: bold;">.</span>util <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * HTMLUtil
	 */</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> HTMLUtil <span style="color: #000000;">&#123;</span>		
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> orderedList<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> tabs<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>				
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&lt;ol&gt;&quot;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> tab_str <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">while</span><span style="color: #000000;">&#40;</span>tabs<span style="color: #000066; font-weight: bold;">--</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					tab_str <span style="color: #000066; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;<span style="">\t</span>&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> orderedList_array <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Array</span> = <span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&lt;/ol&gt;&lt;ol&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> numberedList_str<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = orderedList_array<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				<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;">1</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> orderedList_array<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>
					<span style="color: #6699cc; font-weight: bold;">var</span> listItem_array <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Array</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>orderedList_array<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&lt;li&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">slice</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<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> j <span style="color: #000066; font-weight: bold;">&lt;</span> listItem_array<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> j<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
						<span style="color: #6699cc; font-weight: bold;">var</span> list_str<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">&quot;.&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> tab_str <span style="color: #000066; font-weight: bold;">+</span> HTMLUtil<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span>listItem_array<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;[<span style="">\n</span>]&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;br&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
						list_str = HTMLUtil<span style="color: #000066; font-weight: bold;">.</span>remove<span style="color: #000000;">&#40;</span>list_str<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;[<span style="">\r</span>]&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
						list_str = HTMLUtil<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span>list_str<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;br /&gt;&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;br /&gt;&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> tab_str<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
						list_str = HTMLUtil<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span>list_str<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;br /&gt;&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>tab_str <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">&quot;<span style="">\t</span>&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;br /&gt;&lt;br /&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>					
						numberedList_str <span style="color: #000066; font-weight: bold;">+</span>= list_str<span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
				HTMLUtil<span style="color: #000066; font-weight: bold;">.</span>remove<span style="color: #000000;">&#40;</span>numberedList_str<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;&lt;/ol&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">return</span> numberedList_str<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #339966; font-weight: bold;">function</span> remove<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> remove<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> HTMLUtil<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">,</span> remove<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">''</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> remove<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">replace</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> pattern<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">RegExp</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">RegExp</span><span style="color: #000000;">&#40;</span>remove<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">'g'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">replace</span><span style="color: #000000;">&#40;</span>pattern<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">replace</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.deviouswork.com/2009/04/21/ordered-lists-in-textfieldhtmltext/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple ScrollBar Class</title>
		<link>http://www.deviouswork.com/2009/01/24/simple-scrollbar-class/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-scrollbar-class</link>
		<comments>http://www.deviouswork.com/2009/01/24/simple-scrollbar-class/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 11:58:52 +0000</pubDate>
		<dc:creator>Joakim Roos</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[ScrollBar]]></category>

		<guid isPermaLink="false">http://blog.deviouswork.com/?p=229</guid>
		<description><![CDATA[Basic and simple ScrollBar class based on com.jeroenwijering.utils.Scrollbar ?View Code AS3/** * com.deviouswork.display.utils.ScrollBar * @version 1.0.0 * @author Joakim Roos &#124; j at deviouswork dot com * * Bases on com.jeroenwijering.utils.Scrollbar - but allowing any displayobject * to be scrolled and using any graphics as a scroll. * (http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/utils/Scrollbar.as) * * Copyright (c) 2009 Deviouswork [...]]]></description>
			<content:encoded><![CDATA[<p>Basic and simple ScrollBar class based on <a href="http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/utils/Scrollbar.as">com.jeroenwijering.utils.Scrollbar</a><span id="more-229"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p229code10'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p22910"><td class="code" id="p229code10"><pre class="as3" style="font-family:monospace;"><span style="color: #3f5fbf;">/**
 * com.deviouswork.display.utils.ScrollBar
 * @version 1.0.0
 * @author Joakim Roos | j  at deviouswork dot com 
 * 
 * Bases on com.jeroenwijering.utils.Scrollbar - but allowing any displayobject
 * to be scrolled and using any graphics as a scroll.
 * (http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/utils/Scrollbar.as)
 * 
 * Copyright (c) 2009 Deviouswork
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the &quot;Software&quot;), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>deviouswork<span style="color: #000066; font-weight: bold;">.</span>display<span style="color: #000066; font-weight: bold;">.</span>utils <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<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>
	<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;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>		
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * ScrollBar
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ScrollBar <span style="color: #000000;">&#123;</span>
&nbsp;
&nbsp;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _scroll <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _scrollBar <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _scrollTrack <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _scrollTarget <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _mask <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _proportions_num <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
&nbsp;
		<span style="color: #3f5fbf;">/*
		 * STATIC vars unused at the moment.
		 */</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">VERTICAL</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;vertical&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">HORIZONTAL</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;horizontal&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #3f5fbf;">/**
		 * Constructor
		 * 
		 * @param target	DisplayObject to scroll.
		 * @param mask		DisplayObject that masks the target.
		 * @param bar		DisplayObject used as graphic representation of the scrollbar.
		 * @param track		DisplayObject used to guide the bar.
		 */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ScrollBar<span style="color: #000000;">&#40;</span><span style="color: #004993;">target</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">mask</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">,</span> bar <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">track</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">DisplayObject</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>
			_scrollTarget = <span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">;</span>
			_mask = <span style="color: #004993;">mask</span><span style="color: #000066; font-weight: bold;">;</span>
			_scrollBar = bar<span style="color: #000066; font-weight: bold;">;</span>
			_scrollTrack = <span style="color: #004993;">track</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span>_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>_scrollTrack<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span>_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>_scrollBar<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_scrollTrack<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_scrollBar<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span>_scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_scroll<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #3f5fbf;">/**
		 * Add events for the scroll and sets the correct proportions.
		 */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</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>
			_scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">+</span> _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">+</span> _scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span>
			_proportions_num = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">/</span> _scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>_proportions_num <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>
				_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">*</span> _proportions_num<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> hitShape <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Sprite</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				hitShape<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xfff000<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				hitShape<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span>_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> _scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> _scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span> _scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				hitShape<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				hitShape<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000066; font-weight: bold;">-</span>_scrollTrack<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>
				_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>hitShape<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				_scroll<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_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> _onMouseDown<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
				_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</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_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> _onMouseDown<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #3f5fbf;">/**
		 * Event Handlers
		 */</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _onMouseDown<span style="color: #000000;">&#40;</span>event_m <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">MouseEvent</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>
			_scroll<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;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> _onScrollTarget<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_mask<span style="color: #000066; font-weight: bold;">.</span><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_UP</span><span style="color: #000066; font-weight: bold;">,</span> _onMouseUp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _onMouseUp<span style="color: #000000;">&#40;</span>event_m <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">MouseEvent</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>
			_scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</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;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> _onScrollTarget<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</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_UP</span><span style="color: #000066; font-weight: bold;">,</span> _onMouseUp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _onScrollTarget<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>
			<span style="color: #6699cc; font-weight: bold;">var</span> mps <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Number</span> = _scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mouseY</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>mps <span style="color: #000066; font-weight: bold;">&lt;</span> _scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
				_scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>mps <span style="color: #000066; font-weight: bold;">&gt;</span> _scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">-</span> _scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _scroll<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">-</span> _scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>
				_scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">+</span> _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">-</span> _scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				_scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = mps <span style="color: #000066; font-weight: bold;">-</span> _scrollBar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
				_scrollTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">+</span> _mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #009966; font-style: italic;">/ 2 - mps /</span> _proportions_num<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.deviouswork.com/2009/01/24/simple-scrollbar-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

