<?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: Taking a Closer Look at the ActionScript 3.0 Event Framework</title>
	<atom:link href="http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/</link>
	<description>Flash, Flex &#38; ActionScript Tutorials</description>
	<lastBuildDate>Sat, 21 Nov 2009 17:18:16 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel Apt</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-11032</link>
		<dc:creator>Daniel Apt</dc:creator>
		<pubDate>Fri, 06 Nov 2009 21:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-11032</guid>
		<description>Hi there, I&#039;m sorry kanti, I won&#039;t put my email publicly here, however I&#039;ll try to help you with this comment.

Are you sure that it&#039;s possible to type in the text field, is it a text field of type input? If not, you can easily change it by doing the following:

myTextField.type = TextFieldType.INPUT

If that doesn&#039;t work it might mean that the text field doesn&#039;t have focus, only objects that have focus can dispatch keyboard events. Text fields get focus when you click on them, if you want to you can also set the focus manually:

stage.focus = myTextField;

Why not check what has focus? This might help you:

stage.addEventListener(FocusEvent.FOCUS_IN, checkFocus);
function checkFocus(event:FocusEvent){
	trace(&#039;The following object has focus:&#039;);
	trace(event.target.name);
	trace(&#039;Which is of type:&#039;);
	trace(event.target);
}

Or else feel free to contact me on twitter, where I&#039;ll give you my email:
http://twitter.com/DanielApt</description>
		<content:encoded><![CDATA[<p>Hi there, I&#8217;m sorry kanti, I won&#8217;t put my email publicly here, however I&#8217;ll try to help you with this comment.</p>
<p>Are you sure that it&#8217;s possible to type in the text field, is it a text field of type input? If not, you can easily change it by doing the following:</p>
<p>myTextField.type = TextFieldType.INPUT</p>
<p>If that doesn&#8217;t work it might mean that the text field doesn&#8217;t have focus, only objects that have focus can dispatch keyboard events. Text fields get focus when you click on them, if you want to you can also set the focus manually:</p>
<p>stage.focus = myTextField;</p>
<p>Why not check what has focus? This might help you:</p>
<p>stage.addEventListener(FocusEvent.FOCUS_IN, checkFocus);<br />
function checkFocus(event:FocusEvent){<br />
	trace(&#8217;The following object has focus:&#8217;);<br />
	trace(event.target.name);<br />
	trace(&#8217;Which is of type:&#8217;);<br />
	trace(event.target);<br />
}</p>
<p>Or else feel free to contact me on twitter, where I&#8217;ll give you my email:<br />
<a href="http://twitter.com/DanielApt" rel="nofollow">http://twitter.com/DanielApt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Apt</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-11027</link>
		<dc:creator>Daniel Apt</dc:creator>
		<pubDate>Fri, 06 Nov 2009 20:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-11027</guid>
		<description>Hi there unp,

Bubbling down would be a huge problem, think of it, if there would be a menu and I clicked on it, then the click event would bubble down to all buttons inside that menu, because of this all the event listeners added to all these buttons would call their handlers, that would be terrible!

Okay, back to your problem: it&#039;s possible to access the girl object from within the boy object. I don&#039;t have a precise idea of what the hierarchical structure is of your project, but let&#039;s say it&#039;s like the following image:
http://twitpic.com/oinsz

I can then access girl from boy with:
root.containerB.girl or with
parent.parent.containerB.girl

Do note that both containers must be added to the stage, and the girl and boy object must be added to the corresponding container before you can start referencing it (or else you&#039;ll get a reference error). Also adding event listeners can be only done when all objects have been added to the stage and their corresponding containers.

If you&#039;d want boy to do something when girl is clicked you could do:

root.containerB.girl.addEventListener(MouseEvent.CLICK, boyResponse);

function boyResponse(event:MouseEvent) {
     trace(&quot;Don&#039;t touch my girl!&quot;);
}

I hope this helps you and or else you can connect with me via twitter:
http://twitter.com/DanielApt</description>
		<content:encoded><![CDATA[<p>Hi there unp,</p>
<p>Bubbling down would be a huge problem, think of it, if there would be a menu and I clicked on it, then the click event would bubble down to all buttons inside that menu, because of this all the event listeners added to all these buttons would call their handlers, that would be terrible!</p>
<p>Okay, back to your problem: it&#8217;s possible to access the girl object from within the boy object. I don&#8217;t have a precise idea of what the hierarchical structure is of your project, but let&#8217;s say it&#8217;s like the following image:<br />
<a href="http://twitpic.com/oinsz" rel="nofollow">http://twitpic.com/oinsz</a></p>
<p>I can then access girl from boy with:<br />
root.containerB.girl or with<br />
parent.parent.containerB.girl</p>
<p>Do note that both containers must be added to the stage, and the girl and boy object must be added to the corresponding container before you can start referencing it (or else you&#8217;ll get a reference error). Also adding event listeners can be only done when all objects have been added to the stage and their corresponding containers.</p>
<p>If you&#8217;d want boy to do something when girl is clicked you could do:</p>
<p>root.containerB.girl.addEventListener(MouseEvent.CLICK, boyResponse);</p>
<p>function boyResponse(event:MouseEvent) {<br />
     trace(&#8221;Don&#8217;t touch my girl!&#8221;);<br />
}</p>
<p>I hope this helps you and or else you can connect with me via twitter:<br />
<a href="http://twitter.com/DanielApt" rel="nofollow">http://twitter.com/DanielApt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kanti</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-10981</link>
		<dc:creator>kanti</dc:creator>
		<pubDate>Fri, 06 Nov 2009 07:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-10981</guid>
		<description>i am stuck in a problem, where i am using a textfield in sprite object.
i have to write in the textfield using keyboardevent.
mouseclickevent is working but keyboard is not.
please give ur emailid so that i can send u source code.
thanks in advance.
please reply!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>i am stuck in a problem, where i am using a textfield in sprite object.<br />
i have to write in the textfield using keyboardevent.<br />
mouseclickevent is working but keyboard is not.<br />
please give ur emailid so that i can send u source code.<br />
thanks in advance.<br />
please reply!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unp</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-10648</link>
		<dc:creator>unp</dc:creator>
		<pubDate>Wed, 04 Nov 2009 09:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-10648</guid>
		<description>this bubbling thing is the worst thing ever. How do I make my girl object to listen to my boy object when they are cousins, not parent/child? In other words, how do I get two objects to listen to each other? Why would Adobe write Events this way? I don&#039;t want my events to &quot;bubble up&quot;... bubbling down would be more useful. wtf guys. wtf. Am I going to have to make my own &quot;Event&quot; implementation using arrays on all the event-dispatching objects -- to have it work the way it should?</description>
		<content:encoded><![CDATA[<p>this bubbling thing is the worst thing ever. How do I make my girl object to listen to my boy object when they are cousins, not parent/child? In other words, how do I get two objects to listen to each other? Why would Adobe write Events this way? I don&#8217;t want my events to &#8220;bubble up&#8221;&#8230; bubbling down would be more useful. wtf guys. wtf. Am I going to have to make my own &#8220;Event&#8221; implementation using arrays on all the event-dispatching objects &#8212; to have it work the way it should?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Smashing Buzz</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-10409</link>
		<dc:creator>Smashing Buzz</dc:creator>
		<pubDate>Sat, 31 Oct 2009 08:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-10409</guid>
		<description>looks really advance tutorial.</description>
		<content:encoded><![CDATA[<p>looks really advance tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamza</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-9680</link>
		<dc:creator>Hamza</dc:creator>
		<pubDate>Sun, 25 Oct 2009 04:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-9680</guid>
		<description>Really a great tutorial.

thanks alot</description>
		<content:encoded><![CDATA[<p>Really a great tutorial.</p>
<p>thanks alot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Admin</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-9616</link>
		<dc:creator>Admin</dc:creator>
		<pubDate>Fri, 23 Oct 2009 20:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-9616</guid>
		<description>Excellent Tutorial!!

Really this was very very helpful for me in my Action Script project.

I was in trouble with ENTER_FRAME event type dispatched by different objects. When I set priority asper my needs it is working fine.

Thanks a lot!!</description>
		<content:encoded><![CDATA[<p>Excellent Tutorial!!</p>
<p>Really this was very very helpful for me in my Action Script project.</p>
<p>I was in trouble with ENTER_FRAME event type dispatched by different objects. When I set priority asper my needs it is working fine.</p>
<p>Thanks a lot!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: An Introduction to Tweening with ActionScript 3.0 : Webby Tutos &#8211; Online tutorials &#8211; FREE!</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-8368</link>
		<dc:creator>An Introduction to Tweening with ActionScript 3.0 : Webby Tutos &#8211; Online tutorials &#8211; FREE!</dc:creator>
		<pubDate>Tue, 13 Oct 2009 04:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-8368</guid>
		<description>[...] Even though we have buttons, we need to add event listeners, or else our buttons won&#8217;t do anything. If you don&#8217;t understand how event listeners work, or want to learn about the event framework, check my other tutorial Taking a Closer Look at the ActionScript 3.0 Event Framework. [...]</description>
		<content:encoded><![CDATA[<p>[...] Even though we have buttons, we need to add event listeners, or else our buttons won&#8217;t do anything. If you don&#8217;t understand how event listeners work, or want to learn about the event framework, check my other tutorial Taking a Closer Look at the ActionScript 3.0 Event Framework. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: An Introduction to Tweening with ActionScript 3.0 : Webby Tutos &#8211; Online tutorials &#8211; FREE!</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-8367</link>
		<dc:creator>An Introduction to Tweening with ActionScript 3.0 : Webby Tutos &#8211; Online tutorials &#8211; FREE!</dc:creator>
		<pubDate>Tue, 13 Oct 2009 04:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-8367</guid>
		<description>[...] Even though we have buttons, we need to add event listeners, or else our buttons won&#8217;t do anything. If you don&#8217;t understand how event listeners work, or want to learn about the event framework, check my other tutorial Taking a Closer Look at the ActionScript 3.0 Event Framework. [...]</description>
		<content:encoded><![CDATA[<p>[...] Even though we have buttons, we need to add event listeners, or else our buttons won&#8217;t do anything. If you don&#8217;t understand how event listeners work, or want to learn about the event framework, check my other tutorial Taking a Closer Look at the ActionScript 3.0 Event Framework. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://active.tutsplus.com/tutorials/actionscript/a-close-look-at-the-actionscript-30-event-framework/#comment-7463</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Wed, 23 Sep 2009 21:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://flash.tutsplus.com/?p=890#comment-7463</guid>
		<description>Very, very good; thank you from the bottom of  my heart</description>
		<content:encoded><![CDATA[<p>Very, very good; thank you from the bottom of  my heart</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 2/7 queries in 0.007 seconds using memcached

Served from: psdtutsplus.com @ 2009-11-21 13:24:47 -->