A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Collisions between objects in two different levels?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Is there anyway I can detect collisions between objects on two different levels? Because im using loadmovie() to load two different movies onto the stage and then i want them to be able to interact with each other through collisions. Thanks so much for your help!!!

  2. #2
    Old dog learning new tricks

    Join Date
    Dec 2000
    I guess u must think of a formula to compare the coordinates of the 2 clips. Like:
    if (Math.abs(_level0.clip1._x-_level1.clip2._x)<difX && Math.abs(_level0.clip1._y-_level1.clip2._y)<difY){
    //your code here
    You can set the difX and difY as u like.
    It's just a thought, I haven't tried yet. I hope it will help u.
    [Edited by k-giannis on 02-18-2002 at 06:51 PM]

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Thanks, that sorta helped me out...i got it working!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center