<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Simplify:&#160; Use Boolean Expressions Creatively</title>
	<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Wed, 07 Jan 2009 01:42:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-138455</link>
		<pubDate>Sat, 23 Feb 2008 02:06:30 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-138455</guid>
					<description>Jay,

What you've described would definitely require two movie clips, but the logic involved could be accomplished any number of ways.  In other words, the actual mechanics of fading one clip over another doesn't hinge on a creative or clever use of Boolean expressions.</description>
		<content:encoded><![CDATA[<p>Jay,</p>
<p>What you&#8217;ve described would definitely require two movie clips, but the logic involved could be accomplished any number of ways.  In other words, the actual mechanics of fading one clip over another doesn&#8217;t hinge on a creative or clever use of Boolean expressions.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jay</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-128700</link>
		<pubDate>Mon, 04 Feb 2008 17:50:35 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-128700</guid>
					<description>I have a slideshow that loads external .jpgs with a preloader in between. The drawback with my code is that each picture is reloaded into one movieclip, so one pic fades out then the next fades in once it has loaded. 

A better solution would be for the next pic to fade in over the top of prev pic (i.e. 2 movieclips instead of one. 
I've check through my reference books and can't find an example of this so i was wondering if the boolean function was used for this to divert the fade in fade out functions between 2 movieclips.

Anyone got any ideas?</description>
		<content:encoded><![CDATA[<p>I have a slideshow that loads external .jpgs with a preloader in between. The drawback with my code is that each picture is reloaded into one movieclip, so one pic fades out then the next fades in once it has loaded. </p>
<p>A better solution would be for the next pic to fade in over the top of prev pic (i.e. 2 movieclips instead of one.<br />
I&#8217;ve check through my reference books and can&#8217;t find an example of this so i was wondering if the boolean function was used for this to divert the fade in fade out functions between 2 movieclips.</p>
<p>Anyone got any ideas?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Tiemen</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-19317</link>
		<pubDate>Mon, 19 Feb 2007 13:45:58 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-19317</guid>
					<description>Marvellous, NSurveyor :)</description>
		<content:encoded><![CDATA[<p>Marvellous, NSurveyor <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: NSurveyor</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-11509</link>
		<pubDate>Wed, 10 Jan 2007 20:44:54 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-11509</guid>
					<description>Also, you can take advantage of the fact that casting a boolean (true and false) as a number gives you 1 and 0, respectively. So if you wanted to play frame X if a boolean were false, or otherwise play frame Y (if the boolean were true), you could use something like:

var gotoFrame = X+Number(bool)*(Y-X);
this.gotoAndStop(gotoFrame);

To see why it works, consider when bool = false: Number(bool) would equal 0, and then you would have X+0*(Y-X) = X. Next, consider when bool = true: Number(bool) would equal 1, and then you would have X+1*(Y-X) = X+Y-X=Y.</description>
		<content:encoded><![CDATA[<p>Also, you can take advantage of the fact that casting a boolean (true and false) as a number gives you 1 and 0, respectively. So if you wanted to play frame X if a boolean were false, or otherwise play frame Y (if the boolean were true), you could use something like:</p>
<p>var gotoFrame = X+Number(bool)*(Y-X);<br />
this.gotoAndStop(gotoFrame);</p>
<p>To see why it works, consider when bool = false: Number(bool) would equal 0, and then you would have X+0*(Y-X) = X. Next, consider when bool = true: Number(bool) would equal 1, and then you would have X+1*(Y-X) = X+Y-X=Y.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Paul Mayne</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-10844</link>
		<pubDate>Sun, 07 Jan 2007 05:12:21 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/simplify-use-boolean-expressions-creatively#comment-10844</guid>
					<description>Very cool. Thanks for sharing. I'm dropping this into my little file of code snippets.</description>
		<content:encoded><![CDATA[<p>Very cool. Thanks for sharing. I&#8217;m dropping this into my little file of code snippets.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
