Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
hitTest question

hitTest question

2004-03-18       - By Jesse Warden

 Back
Reply:     1     2     3     4     5     6  

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)