<?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>Patrick Gunderson &#187; flicker</title>
	<atom:link href="http://pat.theorigin.net/tag/flicker/feed/" rel="self" type="application/rss+xml" />
	<link>http://pat.theorigin.net</link>
	<description>Art, Design, Code</description>
	<lastBuildDate>Fri, 02 Sep 2011 19:33:23 +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>Tutorial: A Simple script to create a random flicker</title>
		<link>http://pat.theorigin.net/2008/10/28/tutorial-a-simple-script-to-create-a-random-flicker/</link>
		<comments>http://pat.theorigin.net/2008/10/28/tutorial-a-simple-script-to-create-a-random-flicker/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 08:50:09 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[flicker]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://pat.theorigin.net/?p=75</guid>
		<description><![CDATA[Objective: To create a method that causes a random flickering effect. To set this up , create a movieclip on stage and give it an instance name of myCoverUp. The script below, declares a variable on the main timeline so &#8230; <a href="http://pat.theorigin.net/2008/10/28/tutorial-a-simple-script-to-create-a-random-flicker/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Objective:</strong></p>
<p>To create a method that causes a random flickering effect.</p>
<p>To set this up , create a movieclip on stage and give it an instance name of myCoverUp. The script below, declares a variable on the main timeline so it can be used outside the scope of the function flicker(). Then the function flicker chooses a random number between 0-50, toggles  the visibility of myCoverUp, then clears and creates a new interval timer using the random number as a delay.</p>
<pre class="code">var nextInterval = 100;
flickerInterval = setInterval(flicker, nextInterval);
function flicker(){
    nextInterval = Math.random() * 50;
    myCoverUp._visible = !myCoverUp._visible;
    clearInterval(flickerInterval);
    flickerInterval = setInterval(flicker, nextInterval);
} </pre>
]]></content:encoded>
			<wfw:commentRss>http://pat.theorigin.net/2008/10/28/tutorial-a-simple-script-to-create-a-random-flicker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

