<?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>Always Get Better &#187; Flex</title>
	<atom:link href="http://www.alwaysgetbetter.com/blog/category/general-programming/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alwaysgetbetter.com/blog</link>
	<description>Never stop looking for ways to improve</description>
	<lastBuildDate>Wed, 02 Jun 2010 12:16:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Accessing the stage in Flex</title>
		<link>http://www.alwaysgetbetter.com/blog/2008/11/09/accessing-the-stage-in-flex/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2008/11/09/accessing-the-stage-in-flex/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 03:23:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[flex builder]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=61</guid>
		<description><![CDATA[When creating components in Flex, designers sometimes need to attach events to the main stage.  Unless the application has reached creationComplete, the stage property of custom components will be null.
If you need to, for example, attach a MOUSE_MOVE event to the application stage from a component that doesn&#8217;t include a creationComplete override, you have [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>When creating components in Flex, designers sometimes need to attach events to the main stage.  Unless the application has reached <strong>creationComplete</strong>, the <strong><em>stage</em> </strong>property of custom components will be <em>null</em>.</p>
<p>If you need to, for example, attach a MOUSE_MOVE event to the application stage from a component that doesn&#8217;t include a <strong>creationComplete </strong>override, you have two options.</p>
<h2>Wait for Event.ADDED_TO_STAGE</h2>
<p>addEventListener( Event.ADDED_TO_STAGE, function(e:Event):void<br />
{<br />
stage.addEventListener( MouseEvent.MOUSE_MOVE, myMouseMoveEvent );<br />
});</p>
<h2>Attach Through the System Manager Object</h2>
<p>The system manager parents all displayable elements within the Flex application.  It is an elegant way of accessing the stage through custom flex components which have not yet been added to it.</p>
<p>systemManager.stage.addEventListener( MouseEvent.MOUSE_MOVE, myMouseMoveEvent );</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2008/11/09/accessing-the-stage-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
