A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: checking for...

  1. #1
    file not found Captain_404's Avatar
    Join Date
    Apr 2006
    Posts
    457

    checking for...

    I was wondering how you would check during a hittest to see if what your hitting has a certain variable atatched to it.

    Say, occasionally when I hit the mc "bob" he's happy, so bob.happy = true. but some time he's not, so bob.happy = false

    How would I check for this during a hittest?

    Am I being clear enough?

  2. #2
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    for example
    if(_root.bob.hitTest(_root.square)){
    if(_root.bob.happy){
    //if true do this
    }else{
    // if not do this
    }
    }
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


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