<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Cryptography and Flash</title>
	<atom:link href="http://www.jek2k.com/wp/2007/05/22/cryptography-and-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jek2k.com/wp/2007/05/22/cryptography-and-flash/</link>
	<description>still awake at night?</description>
	<lastBuildDate>Sun, 10 Apr 2011 14:58:04 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: William</title>
		<link>http://www.jek2k.com/wp/2007/05/22/cryptography-and-flash/comment-page-1/#comment-12536</link>
		<dc:creator>William</dc:creator>
		<pubDate>Fri, 04 Apr 2008 14:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2007/05/09/cryptography-and-flash/#comment-12536</guid>
		<description>First of all, this is my first message here and I wanted to say &quot;Nice site!&quot;.

Just a little Actionscript tip. I&#039;ve been updating a large Flash app created elsewhere and trying to optimize the code. In many places in the 2 dozen or so classes, there are checks for whether a variable is empty (&quot;&quot;) or undefined. I had used this comparison myself many times, and find it annoying that Flash doesn&#039;t have a one-size-fits-all way to check if data exists for a variable. PHP&#039;s empty() method comes to mind. So I did an experiment and Flash does work like empty() without a special method. If you do this:

if ($myvar) { /* do stuff * }

then the if statement will return false if:

a) the variable is an empty string, ie. &quot;&quot;
b) the variable is undefined
c) the variable is set to null
d) the variable is zero, ie. 0

Of course you have to be careful if the variable is boolean, or what the type is, but if you know it&#039;s supposed to be a string, then it&#039;s easy.</description>
		<content:encoded><![CDATA[<p>First of all, this is my first message here and I wanted to say &#8220;Nice site!&#8221;.</p>
<p>Just a little Actionscript tip. I&#8217;ve been updating a large Flash app created elsewhere and trying to optimize the code. In many places in the 2 dozen or so classes, there are checks for whether a variable is empty (&#8221;") or undefined. I had used this comparison myself many times, and find it annoying that Flash doesn&#8217;t have a one-size-fits-all way to check if data exists for a variable. PHP&#8217;s empty() method comes to mind. So I did an experiment and Flash does work like empty() without a special method. If you do this:</p>
<p>if ($myvar) { /* do stuff * }</p>
<p>then the if statement will return false if:</p>
<p>a) the variable is an empty string, ie. &#8220;&#8221;<br />
b) the variable is undefined<br />
c) the variable is set to null<br />
d) the variable is zero, ie. 0</p>
<p>Of course you have to be careful if the variable is boolean, or what the type is, but if you know it&#8217;s supposed to be a string, then it&#8217;s easy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

