<?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; Effect</title>
	<atom:link href="http://www.deviouswork.com/tag/effect/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>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_1638676233"
			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_1638676233"
			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_1521210536"
			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_1521210536"
			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('p326code3'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3263"><td class="code" id="p326code3"><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('p326code4'); return false;">View Code</a> AS3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3264"><td class="code" id="p326code4"><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>
	</channel>
</rss>

