<?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>Mon, 30 Jan 2012 12:00:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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 [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/05/09/accessing-configuration-parameters-play-frameworks-template-engine/' rel='bookmark' title='Accessing Configuration Parameters using Play Framework&#8217;s Template Engine'>Accessing Configuration Parameters using Play Framework&#8217;s Template Engine</a></li>
</ol>]]></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>
<div style="width:468px;margin:0 auto">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-0410364841759590";
/* Homepage, 468x60 ads, After posts, created 12/19/08 */
google_ad_slot = "4210204644";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/05/09/accessing-configuration-parameters-play-frameworks-template-engine/' rel='bookmark' title='Accessing Configuration Parameters using Play Framework&#8217;s Template Engine'>Accessing Configuration Parameters using Play Framework&#8217;s Template Engine</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2008/11/09/accessing-the-stage-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: alwaysgetbetter.com @ 2012-02-07 18:13:52 -->
