<?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: AS3 &#8220;with&#8221; keyword and casting</title>
	<atom:link href="http://flassari.is/2010/07/as3-with-keyword-and-casting/feed/" rel="self" type="application/rss+xml" />
	<link>http://flassari.is/2010/07/as3-with-keyword-and-casting/</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 13:29:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Ashish</title>
		<link>http://flassari.is/2010/07/as3-with-keyword-and-casting/#comment-1266</link>
		<dc:creator>Ashish</dc:creator>
		<pubDate>Thu, 08 Mar 2012 17:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://flassari.is/?p=321#comment-1266</guid>
		<description>Thanks for the post.

@jooj 

checking if (child) wont guarantee whether its a a movie clip or not.
and hence  


var child:DisplayObject = getChildThatMightBeMovieClip();
 
if (child is MovieClip) {
with (child as MovieClip) {
trace(numChildren);
trace(currentFrame);
}
}

stands out....</description>
		<content:encoded><![CDATA[<p>Thanks for the post.</p>
<p>@jooj </p>
<p>checking if (child) wont guarantee whether its a a movie clip or not.<br />
and hence  </p>
<p>var child:DisplayObject = getChildThatMightBeMovieClip();</p>
<p>if (child is MovieClip) {<br />
with (child as MovieClip) {<br />
trace(numChildren);<br />
trace(currentFrame);<br />
}<br />
}</p>
<p>stands out&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SHAMS</title>
		<link>http://flassari.is/2010/07/as3-with-keyword-and-casting/#comment-1234</link>
		<dc:creator>SHAMS</dc:creator>
		<pubDate>Sat, 03 Mar 2012 05:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://flassari.is/?p=321#comment-1234</guid>
		<description>Thanks
I usually use nested &quot;with&quot;, for my object arrays.</description>
		<content:encoded><![CDATA[<p>Thanks<br />
I usually use nested &#8220;with&#8221;, for my object arrays.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jooj</title>
		<link>http://flassari.is/2010/07/as3-with-keyword-and-casting/#comment-970</link>
		<dc:creator>jooj</dc:creator>
		<pubDate>Fri, 16 Dec 2011 08:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://flassari.is/?p=321#comment-970</guid>
		<description>Simpler:

var child:MovieClip = getChildThatMightBeMovieClip() as MovieClip;
 
if (child) {
    ...
}</description>
		<content:encoded><![CDATA[<p>Simpler:</p>
<p>var child:MovieClip = getChildThatMightBeMovieClip() as MovieClip;</p>
<p>if (child) {<br />
    &#8230;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

