<?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: Managing multiple balls collisions with Flash</title>
	<atom:link href="http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Sat, 11 Feb 2012 05:27:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: rams</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-1021692</link>
		<dc:creator>rams</dc:creator>
		<pubDate>Wed, 14 Dec 2011 11:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-1021692</guid>
		<description>i didn`t understood the function of below line.. plz somebody explain....
&quot;dVector = (ballA.xspeed-ballB.xspeed)*normalX+(ballA.yspeed-ballB.yspeed)*normalY&quot;

thanqqqqqqqqq</description>
		<content:encoded><![CDATA[<p>i didn`t understood the function of below line.. plz somebody explain&#8230;.<br />
&#8220;dVector = (ballA.xspeed-ballB.xspeed)*normalX+(ballA.yspeed-ballB.yspeed)*normalY&#8221;</p>
<p>thanqqqqqqqqq</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aby</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-864805</link>
		<dc:creator>Aby</dc:creator>
		<pubDate>Thu, 30 Jun 2011 08:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-864805</guid>
		<description>Any body...pls   help me to stop the balls after 15 sec :(</description>
		<content:encoded><![CDATA[<p>Any body&#8230;pls   help me to stop the balls after 15 sec :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-830191</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Tue, 10 May 2011 06:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-830191</guid>
		<description>Hi,
this version doesn&#039;t take into account ball&#039;s mass like the one in this page
http://www.emanueleferonato.com/2007/08/19/managing-ball-vs-ball-collision-with-flash/

Can you revise this version ?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
this version doesn&#8217;t take into account ball&#8217;s mass like the one in this page<br />
<a href="http://www.emanueleferonato.com/2007/08/19/managing-ball-vs-ball-collision-with-flash/" rel="nofollow">http://www.emanueleferonato.com/2007/08/19/managing-ball-vs-ball-collision-with-flash/</a></p>
<p>Can you revise this version ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atoi_power</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-534057</link>
		<dc:creator>atoi_power</dc:creator>
		<pubDate>Thu, 31 Dec 2009 00:32:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-534057</guid>
		<description>This cool, 

 i try to collided between two ball, i mean like pool game but i&#039;m using on press key function, it seem I&#039;ve gone no where,  can some one help me on this,,,</description>
		<content:encoded><![CDATA[<p>This cool, </p>
<p> i try to collided between two ball, i mean like pool game but i&#8217;m using on press key function, it seem I&#8217;ve gone no where,  can some one help me on this,,,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GhostlyGamer</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-517966</link>
		<dc:creator>GhostlyGamer</dc:creator>
		<pubDate>Wed, 04 Nov 2009 00:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-517966</guid>
		<description>This is a very cool tutorial, but I was wondering how to make a function for when the mouse rollsover a circle, my _root.lives, goes -1. Is there a way I can go this?</description>
		<content:encoded><![CDATA[<p>This is a very cool tutorial, but I was wondering how to make a function for when the mouse rollsover a circle, my _root.lives, goes -1. Is there a way I can go this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Z_dub</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-514613</link>
		<dc:creator>Z_dub</dc:creator>
		<pubDate>Mon, 26 Oct 2009 14:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-514613</guid>
		<description>hello, im working on a project for school and ive gome to a little roadblock, i hope this is the right thread to post on
hered teh code ive got so far, the names are from a tutorial i used to pretty much start it

chevelle_mc.addEventListener(MouseEvent.MOUSE_UP, carStart)
function carStart(carMove:Event):void{
Mouse.hide()
chevelle_mc.startDrag();
};
//1.
truck_mc.addEventListener(Event.ENTER_FRAME, circleHit);

//2.
function circleHit(truckMove:Event):void {
if (truck_mc.hitTestObject(chevelle_mc) ){
text_mc.visible = true;
} else {
text_mc.visible = false;
}
};

i have two problems, the first is that i have multiple trucks, there all named accordingly, truck_mc, truck2_mc and so on...but only the first one will collide with my ball.  where would i put the code to make so that it also collides with the rest of them?
also, i want the video to stop until i can click the ball, and ive seen a lot of other tutorials that say to use a stop() method, where would i put that, and how would i phrase it?</description>
		<content:encoded><![CDATA[<p>hello, im working on a project for school and ive gome to a little roadblock, i hope this is the right thread to post on<br />
hered teh code ive got so far, the names are from a tutorial i used to pretty much start it</p>
<p>chevelle_mc.addEventListener(MouseEvent.MOUSE_UP, carStart)<br />
function carStart(carMove:Event):void{<br />
Mouse.hide()<br />
chevelle_mc.startDrag();<br />
};<br />
//1.<br />
truck_mc.addEventListener(Event.ENTER_FRAME, circleHit);</p>
<p>//2.<br />
function circleHit(truckMove:Event):void {<br />
if (truck_mc.hitTestObject(chevelle_mc) ){<br />
text_mc.visible = true;<br />
} else {<br />
text_mc.visible = false;<br />
}<br />
};</p>
<p>i have two problems, the first is that i have multiple trucks, there all named accordingly, truck_mc, truck2_mc and so on&#8230;but only the first one will collide with my ball.  where would i put the code to make so that it also collides with the rest of them?<br />
also, i want the video to stop until i can click the ball, and ive seen a lot of other tutorials that say to use a stop() method, where would i put that, and how would i phrase it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Awoke</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-339764</link>
		<dc:creator>Awoke</dc:creator>
		<pubDate>Thu, 20 Nov 2008 15:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-339764</guid>
		<description>It&#039;s exactly what I was looking for, thanks :]</description>
		<content:encoded><![CDATA[<p>It&#8217;s exactly what I was looking for, thanks :]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malboro Jones</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-277403</link>
		<dc:creator>Malboro Jones</dc:creator>
		<pubDate>Mon, 15 Sep 2008 21:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-277403</guid>
		<description>heeeey can someone help me,
I&#039;ve searched for hours on the web and cant find out how to make a boundary!
I have a ball game, simply the ball moves around at the moment, I&#039;m really new to Flash Gaming so I&#039;m just testing things right now, but I seriously need to know how to stop the ball from flying off the stage!
If you could send me instructions directly via email that would be great!
malborojones@hotmail.co.uk

All help will be very much appreciated thank you!</description>
		<content:encoded><![CDATA[<p>heeeey can someone help me,<br />
I&#8217;ve searched for hours on the web and cant find out how to make a boundary!<br />
I have a ball game, simply the ball moves around at the moment, I&#8217;m really new to Flash Gaming so I&#8217;m just testing things right now, but I seriously need to know how to stop the ball from flying off the stage!<br />
If you could send me instructions directly via email that would be great!<br />
<a href="mailto:malborojones@hotmail.co.uk">malborojones@hotmail.co.uk</a></p>
<p>All help will be very much appreciated thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Managing multiple balls collisions with Flash: AS3 version : Emanuele Feronato - italian geek and PROgrammer</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-187079</link>
		<dc:creator>Managing multiple balls collisions with Flash: AS3 version : Emanuele Feronato - italian geek and PROgrammer</dc:creator>
		<pubDate>Sat, 07 Jun 2008 21:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-187079</guid>
		<description>[...] days ago Sunil Changrani sent me a the script to manage multiple balls collisions with Flash, in [...]</description>
		<content:encoded><![CDATA[<p>[...] days ago Sunil Changrani sent me a the script to manage multiple balls collisions with Flash, in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bradley</title>
		<link>http://www.emanueleferonato.com/2008/05/27/managing-multiple-balls-collisions-with-flash/#comment-182351</link>
		<dc:creator>Bradley</dc:creator>
		<pubDate>Wed, 04 Jun 2008 06:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/?p=282#comment-182351</guid>
		<description>This code doesn&#039;t seem very effiecent. Check the first ball against every other one, the second against every one but the first, and so forth. That adds up to 49+48+...+3+2+1 equations solved every frame, or 1275. Mutiply that by a modest 10fps? 12250 equations per second. 

Not very efficient, though it is easier to understand and code that some more advanced algorithms. A final point, if 100 balls are used, that&#039;s 50500 times the lines inside the &quot;for loop&quot; are called. hmm. I don&#039;t know about my computer, but I couldn&#039;t calculate that many equations per second. 

Good suggestion Krystian to reduce the number of checks, and also voidSkipper, that&#039;s a great idea!</description>
		<content:encoded><![CDATA[<p>This code doesn&#8217;t seem very effiecent. Check the first ball against every other one, the second against every one but the first, and so forth. That adds up to 49+48+&#8230;+3+2+1 equations solved every frame, or 1275. Mutiply that by a modest 10fps? 12250 equations per second. </p>
<p>Not very efficient, though it is easier to understand and code that some more advanced algorithms. A final point, if 100 balls are used, that&#8217;s 50500 times the lines inside the &#8220;for loop&#8221; are called. hmm. I don&#8217;t know about my computer, but I couldn&#8217;t calculate that many equations per second. </p>
<p>Good suggestion Krystian to reduce the number of checks, and also voidSkipper, that&#8217;s a great idea!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 5/11 queries in 0.026 seconds using disk: basic

Served from: www.emanueleferonato.com @ 2012-02-11 12:58:28 -->
