dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: hitTest

  1. #1
    Senior Member
    Join Date
    Mar 2008
    Location
    England
    Posts
    159

    hitTest

    Hi
    is it possible to change a var (make it another number) if a hitTest occurs? cause i tried that and it didnt work here is the code:
    PHP Code:
    onClipEvent(enterFrame){ if(this.hitTest(_root.car)){ var rhys 5; } } 
    I have made a dynamic text box with the var name and on the main timeline var rhys = 0; is there and i have made sure the instance name car isthere and there is 2 objects to hit and everything it just doesnt seem to work!
    Thanks
    Thanks
    Rhys

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    tell the dynamic text to update after your above if statement fires
    ~calmchess~

  3. #3
    Senior Member
    Join Date
    Mar 2008
    Location
    England
    Posts
    159
    ANd how do u do that????
    Thanks
    Rhys

  4. #4
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    onClipEvent(enterFrame){ if(this.hitTest(_root.car)){ var rhys = 5; msg0.text = rhys; } }
    ~calmchess~

  5. #5
    Senior Member
    Join Date
    Mar 2008
    Location
    England
    Posts
    159
    Thanks
    Thanks
    Rhys

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