<?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: Quick tip: always use global position for hitTestPoint()</title>
	<atom:link href="http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-tip-always-use-global-position-for-hittestpoint</link>
	<description>My life, my work</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:37:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jozef Chúťka</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-4743</link>
		<dc:creator>Jozef Chúťka</dc:creator>
		<pubDate>Mon, 19 Sep 2011 07:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-4743</guid>
		<description>hi Leo, yes I believe your example is ok for hittesting point(0, 0) in someMovingObject against rocks</description>
		<content:encoded><![CDATA[<p>hi Leo, yes I believe your example is ok for hittesting point(0, 0) in someMovingObject against rocks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-4742</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Mon, 19 Sep 2011 00:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-4742</guid>
		<description>First of all, Amazing stuff you have. Awesome website. Congratz... I am way beyond impressed.

Now, I was having a lot of trouble with this issue, and this thread saved me. Here&#039;s what I think rtoprani wanted to say:

What if on the example of code at the top you have the someMovingObject inside somewhere else, and you’d need to do something such as ‘someMovingObject.parent.local.. the way MrKishi is implying. 

Say the display list is something like this: 

currentLevel.foreGround.someMovingObject 

and you want to use the hitTestPoint against an object located at:

currentLevel.foreGround.rocks

How would that look like? 

Would this be correct?
//************
var point:Point;
point = currentLevel.foreGround.someMovingObject.localToGlobal(new Point());
currentLevel.foreGround.rocks.hitTestPoint(point.x, point.y, true);
//***********

Is always confusing because I know the hitTestPoint works with the stage coordinates, and this is all done well within a display list with childs... so...   just confusing...

Your help would be awesome. Thanks and cheers!!</description>
		<content:encoded><![CDATA[<p>First of all, Amazing stuff you have. Awesome website. Congratz&#8230; I am way beyond impressed.</p>
<p>Now, I was having a lot of trouble with this issue, and this thread saved me. Here&#8217;s what I think rtoprani wanted to say:</p>
<p>What if on the example of code at the top you have the someMovingObject inside somewhere else, and you’d need to do something such as ‘someMovingObject.parent.local.. the way MrKishi is implying. </p>
<p>Say the display list is something like this: </p>
<p>currentLevel.foreGround.someMovingObject </p>
<p>and you want to use the hitTestPoint against an object located at:</p>
<p>currentLevel.foreGround.rocks</p>
<p>How would that look like? </p>
<p>Would this be correct?<br />
//************<br />
var point:Point;<br />
point = currentLevel.foreGround.someMovingObject.localToGlobal(new Point());<br />
currentLevel.foreGround.rocks.hitTestPoint(point.x, point.y, true);<br />
//***********</p>
<p>Is always confusing because I know the hitTestPoint works with the stage coordinates, and this is all done well within a display list with childs&#8230; so&#8230;   just confusing&#8230;</p>
<p>Your help would be awesome. Thanks and cheers!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozef Chúťka</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-2645</link>
		<dc:creator>Jozef Chúťka</dc:creator>
		<pubDate>Tue, 27 Jul 2010 07:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-2645</guid>
		<description>@rtoprani Hi, what exatcly is function hitShape()? It seems this one does not exist in AS3, anyway you can use hitTestObject() and this one should work no matter where the objects are parented</description>
		<content:encoded><![CDATA[<p>@rtoprani Hi, what exatcly is function hitShape()? It seems this one does not exist in AS3, anyway you can use hitTestObject() and this one should work no matter where the objects are parented</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rtoprani</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-2641</link>
		<dc:creator>rtoprani</dc:creator>
		<pubDate>Tue, 27 Jul 2010 01:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-2641</guid>
		<description>Hey Jozef,
would it be possible to show how it would be done when &#039;hitShape&#039; (from your example above) is nested a few movieClips below (my_mc1.my_mc.2.hitShape)?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Jozef,<br />
would it be possible to show how it would be done when &#8216;hitShape&#8217; (from your example above) is nested a few movieClips below (my_mc1.my_mc.2.hitShape)?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozef Chúťka</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-2171</link>
		<dc:creator>Jozef Chúťka</dc:creator>
		<pubDate>Thu, 10 Jun 2010 20:54:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-2171</guid>
		<description>@MrKishi, sure thing, thnx for noticing that ;)</description>
		<content:encoded><![CDATA[<p>@MrKishi, sure thing, thnx for noticing that <img src='http://blog.yoz.sk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MrKishi</title>
		<link>http://blog.yoz.sk/2010/06/quick-tip-always-use-global-position-for-hittestpoint/comment-page-1/#comment-2168</link>
		<dc:creator>MrKishi</dc:creator>
		<pubDate>Thu, 10 Jun 2010 17:02:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.yoz.sk/?p=1772#comment-2168</guid>
		<description>The first method may be slower -- but even more importantly, it&#039;s not generic.
I mean, if someMovingObject is inside somewhere else, you&#039;d need to do something such as &#039;someMovingObject.parent.local..&#039;. Ugly stuff.</description>
		<content:encoded><![CDATA[<p>The first method may be slower &#8212; but even more importantly, it&#8217;s not generic.<br />
I mean, if someMovingObject is inside somewhere else, you&#8217;d need to do something such as &#8216;someMovingObject.parent.local..&#8217;. Ugly stuff.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

