hitTest problem

hey there,

I am trying to do a drag and drop game with multiple hitTests for the drop zones. So when an item is over a drop zone it plays the dropzone mc to frame 15 then stops. Then when you move off the drop zone it plays the rest of the dropzone mc and stops.

At the minute it just loops the dropzone mc. I tried a delete onEnterFrame in the hitTest but that kills the hitTest.

I think that makes sense

Heres my code anyway, apoligies if its a bit messy:


myDropZones=[COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_1"[/COLOR],[COLOR=#0000ff]"dropZone_2"[/COLOR],[COLOR=#0000ff]"dropZone_3"[/COLOR],[COLOR=#0000ff]"dropZone_4"[/COLOR],[COLOR=#0000ff]"dropZone_5"[/COLOR][COLOR=#000000]][/COLOR]
[COLOR=#993300]var[/COLOR] curr_item;
[COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] i = [COLOR=#000000]1[/COLOR]; i <= [COLOR=#000000]10[/COLOR]; i++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
    curr_item = itemLine[COLOR=#000000][[/COLOR][COLOR=#0000ff]"item"[/COLOR] + i[COLOR=#000000]][/COLOR];
    curr_item.[COLOR=#000000]num[/COLOR] = i;
    curr_item.[COLOR=#993300]onPress[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
        [COLOR=#993300]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"item"[/COLOR] + [COLOR=#993300]this[/COLOR].[COLOR=#000000]num[/COLOR], [COLOR=#0000ff]"newItem"[/COLOR], [COLOR=#993300]this[/COLOR].[COLOR=#993300]_parent[/COLOR].[COLOR=#993300]getNextHighestDepth[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
        [COLOR=#993300]this[/COLOR].[COLOR=#993300]_alpha[/COLOR] = [COLOR=#000000]10[/COLOR];
        [COLOR=#993300]_root[/COLOR].[COLOR=#000000]visItem[/COLOR] = [COLOR=#993300]this[/COLOR].[COLOR=#000000]num[/COLOR];
        newItem.[COLOR=#993300]_x[/COLOR] = [COLOR=#993300]_xmouse[/COLOR];
        newItem.[COLOR=#993300]_y[/COLOR] = [COLOR=#993300]_ymouse[/COLOR];
        newItem.[COLOR=#993300]startDrag[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        [COLOR=#993300]_root[/COLOR].[COLOR=#000000]newCursor[/COLOR].[COLOR=#993300]nextFrame[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        newItem.[COLOR=#993300]onEnterFrame[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
            [COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] a = [COLOR=#000000]1[/COLOR]; a <= myDropZones.[COLOR=#993300]length[/COLOR]; a++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
                [COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000]][/COLOR].[COLOR=#993300]hitTest[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]this[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
                    [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000])[/COLOR];
                    [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"going up!"[/COLOR][COLOR=#000000])[/COLOR];
                    [COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000]][/COLOR].[COLOR=#993300]play[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
 
                [COLOR=#000000]}[/COLOR][COLOR=#993300]else[/COLOR][COLOR=#000000]{[/COLOR]
                    [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"going down man!!"[/COLOR][COLOR=#000000])[/COLOR];
                    [COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000]][/COLOR].[COLOR=#993300]gotoAndStop[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]1[/COLOR][COLOR=#000000])[/COLOR];
                [COLOR=#000000]}[/COLOR]
            [COLOR=#000000]}[/COLOR]
        [COLOR=#000000]}[/COLOR]
    [COLOR=#000000]}[/COLOR]
     curr_item.[COLOR=#993300]onRelease[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
         [COLOR=#993300]unloadMovie[/COLOR][COLOR=#000000]([/COLOR]newItem[COLOR=#000000])[/COLOR];
         [COLOR=#993300]this[/COLOR].[COLOR=#993300]_alpha[/COLOR] = [COLOR=#000000]100[/COLOR];
        [COLOR=#993300]_root[/COLOR].[COLOR=#000000]newCursor[/COLOR].[COLOR=#993300]prevFrame[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        [COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000]][/COLOR].[COLOR=#993300]gotoAndStop[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]1[/COLOR][COLOR=#000000])[/COLOR];
    [COLOR=#000000]}[/COLOR]
     curr_item.[COLOR=#993300]onReleaseOutside[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
        newItem.[COLOR=#993300]stopDrag[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        [COLOR=#993300]unloadMovie[/COLOR][COLOR=#000000]([/COLOR]newItem[COLOR=#000000])[/COLOR];
        [COLOR=#993300]_root[/COLOR].[COLOR=#000000]newCursor[/COLOR].[COLOR=#993300]prevFrame[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        [COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR]newItem.[COLOR=#993300]_droptarget[/COLOR] == [COLOR=#0000ff]"/content_mc/dropZone_"[/COLOR] + [COLOR=#993300]this[/COLOR].[COLOR=#000000]myDropZone[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
            [COLOR=#993300]this[/COLOR].[COLOR=#993300]_alpha[/COLOR] = [COLOR=#000000]10[/COLOR];
            [COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"item"[/COLOR] + visItem[COLOR=#000000]][/COLOR].[COLOR=#993300]_visible[/COLOR] = [COLOR=#993300]true[/COLOR];
            [COLOR=#993300]this[/COLOR].[COLOR=#993300]enabled[/COLOR] = [COLOR=#993300]false[/COLOR];
            newItem.[COLOR=#993300]_x[/COLOR] = [COLOR=#993300]_root[/COLOR].[COLOR=#000000]dropZone[/COLOR].[COLOR=#993300]_x[/COLOR];
            newItem.[COLOR=#993300]_y[/COLOR] = [COLOR=#993300]_root[/COLOR].[COLOR=#000000]dropZone[/COLOR].[COLOR=#993300]_y[/COLOR];
            newItem.[COLOR=#993300]stopDrag[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
            [COLOR=#993300]_root[/COLOR].[COLOR=#000000]content_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000ff]"dropZone_"[/COLOR]+a[COLOR=#000000]][/COLOR].[COLOR=#993300]gotoAndStop[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]1[/COLOR][COLOR=#000000])[/COLOR];
            [COLOR=#993300]_root[/COLOR].[COLOR=#000000]score[/COLOR] += [COLOR=#000000]1[/COLOR];
            [COLOR=#f000f0]*//check all is finished*[/COLOR]
           [COLOR=#993300]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]_root[/COLOR].[COLOR=#000000]score[/COLOR] == [COLOR=#000000]10[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
                [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"all are right!!"[/COLOR][COLOR=#000000])[/COLOR];
            [COLOR=#000000]}[/COLOR][COLOR=#993300]else[/COLOR][COLOR=#000000]{[/COLOR]
                tweenItemLine[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
                tweenAlphaItems[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
            [COLOR=#000000]}[/COLOR]
        [COLOR=#000000]}[/COLOR][COLOR=#993300]else[/COLOR][COLOR=#000000]{[/COLOR]
            [COLOR=#993300]this[/COLOR].[COLOR=#993300]_alpha[/COLOR] = [COLOR=#000000]100[/COLOR];
            [COLOR=#993300]unloadMovie[/COLOR][COLOR=#000000]([/COLOR]newItem[COLOR=#000000])[/COLOR];
            [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"wrong"[/COLOR][COLOR=#000000])[/COLOR];
            [COLOR=#000000]}[/COLOR]
    [COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]