A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Path finding

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Location
    USA
    Posts
    184

    Path finding

    I need help with my path finding. How can i make the boundary 1 movie clip and still have the car detect the walls and not the empty white space?
    Attached Files Attached Files

  2. #2
    Run for your life! Phlook's Avatar
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    679
    What i do, i dont know if theres a better way is just make a movie clip, and put all of the walls within it, then code on it:

    code:

    onClipEvent(load){
    _global.walls = new Array(this.wall1, this.wall2, etc...);
    }


    then hitTest the array

  3. #3
    Senior Member
    Join Date
    Feb 2004
    Location
    USA
    Posts
    184
    ok ill try that when i get a chance. Does that code only work in MX?

  4. #4
    Run for your life! Phlook's Avatar
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    679
    It should work in 5 also, although i havent tried it..

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Location
    USA
    Posts
    184
    I tried it in flash 5 and it doesnt work or mabey i did it wrong

  6. #6
    Run for your life! Phlook's Avatar
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    679
    Alright so wut u should do, is for ur hitTest code:
    code:

    for(i in _global.walls){
    if(this.hitTest(_global.walls[i])){
    //hitTest code
    }
    }


  7. #7
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    I dont think Flash 5 has anything like "_global".

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