hitTest question 2004-03-18 - By Jesse Warden
Back Sure thing, I never tested that so just learned it too!
-- --Original Message-- -- From: Andreas Weber [mailto:webweber@(protected)] Sent: Thursday, March 18, 2004 08:54 AM To: flashnewbie@(protected) Subject: RE: [Flashnewbie] hitTest question
Thanks Jesse - that solves it!
So the nested while loop looks like:
clips = [A_mc, B_mc, C_mc];
this.onEnterFrame = function(){ var i = clips.length; while(i--){ var j = clips.length; while(j--){ if(i != j){ res = clips[i].hitTest(clips[j]); trace(res); } } } }
Should be a bit faster than the for-loop.
Note: there's a typo in the inner loop of the for-loop in my last post. It should be for(j=0, len2=clips.length; j<len2;j++){
-- ---- ------ Andreas Weber motiondraw.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|