<?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>rabidGadfly &#187; stage</title>
	<atom:link href="http://rabidgadfly.com/tag/stage/feed/" rel="self" type="application/rss+xml" />
	<link>http://rabidgadfly.com</link>
	<description>Simple Solutions to Nagging Coding Problems</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:43:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Can I access Stage from an AS3 Class with no DisplayObject?</title>
		<link>http://rabidgadfly.com/2008/10/refer-to-stage-from-as3-class/</link>
		<comments>http://rabidgadfly.com/2008/10/refer-to-stage-from-as3-class/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 12:59:47 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=80</guid>
		<description><![CDATA[I&#8217;m working on a project that requires creating and adding a Movie Clip to the Stage from a class file. Seemed like an easy task, however, referring to the Stage from my class turned out to be trickier than I thought. I know that, although you can&#8217;t refer to Stage directly, it is a property [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project that requires creating and adding a Movie Clip to the Stage from a class file. Seemed like an easy task, however, referring to the Stage from my class turned out to be trickier than I thought.</p>
<p>I know that, although you can&#8217;t refer to Stage directly, it is a property of every DisplayObject named &#8216;stage&#8217; (lower case &#8216;s&#8217;). For example, if my class extends Sprite, I can get the Stage width by referring to &#8220;stage.width&#8221;.</p>
<p>The problem arises when a class does not extend a DisplayObject and a DisplayObject is not passed to your class. The project I&#8217;m working on fell into this category. The purpose of my class is simply to create and manage instances of another class. The problem I ran into was that I could not refer to the Stage because my class had no reference to a DisplayObject.</p>
<p>I ended up working around the problem by passing a DisplayObject instance, but out of curiosity, I&#8217;d like to know if there is any way around this issue. Is there a way to refer to the Stage from a class file that has no DisplayObject instance?</p>
<p>-rG</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2008/10/refer-to-stage-from-as3-class/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

