A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Hittest help

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    4

    Hittest help

    Hey everyone

    I'm working on a project at the moment, that I'm having a bit of trouble with and I has wondering in anyone could give me a clue as to what I'm doing wrong. I've never used hittests before till this morning, so I'm sure I'm missing something obvious. Basically, all I need to happen is if the hittest is true play a 12 frame movie clip. The code I'm using is

    code:
    onClipEvent(enterFrame){

    if (_root.hitZone, hitTest(_root.big_map.circle)) {
    _root.fadeClip.play();
    }
    }



    problem is i just want the movie to play once and stop on the last frame but it just keeps looping. A stop(); on the last frame of the clip is totally ignored and if i use gotoAndPlay(1); instead of play(); it obviously just stays on frame one as long as the hittest is true. Hope that makes sense, any help would be much appreciated
    Last edited by aldar40; 12-03-2006 at 07:27 PM.

  2. #2
    Senior Member
    Join Date
    Sep 2005
    Posts
    116
    use another if statement (Else if) to see if it's on the last frame and if it is then have it stop();

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