# Falling snow and collision detection. \*New Flasher\*

**URL:** <https://forum.kirupa.com/t/falling-snow-and-collision-detection-new-flasher/296012>\
**Category:** Uncategorized\
**Created:** [September 8, 2009, 6:03pm UTC](https://forum.kirupa.com/t/falling-snow-and-collision-detection-new-flasher/296012 "2009-09-08T18:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nucco](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@Nucco](https://forum.kirupa.com/u/Nucco)\
**Post date:** [September 8, 2009, 6:03pm UTC](https://forum.kirupa.com/t/falling-snow-and-collision-detection-new-flasher/296012/1 "2009-09-08T18:03:48Z")

</div>

Good day, everyone.

I’m having a little trouble with a game I am creating. I created a “falling snow” effect from [this tutorial](http://www.entheosweb.com/Flash/video_tutorials/falling_snowflakes.asp). I then added a movie clip character (which I’ll call the bunny) at the bottom of the screen that is stationary along the \_y axis and can move left or right along the \_x axis.

The point of the game I am trying to create is to have the bunny at the bottom of the screen collect the falling snowflakes, adding score to a counter. However, I am having trouble detecting when the flakes touch the bunny. I have tried using the hitTest in every way I could think of but nothing works. Here is my code:

```auto
this.createEmptyMovieClip("canvas_mc", 10);

Interval = setInterval(addDart, 1000);

function addDart () {
    if(1 < 10) {
        var t:MovieClip = canvas_mc.attachMovie("dart1", "dart"+i, canvas_mc.getNextHighestDepth())
        i++;
        t._x = Math.random()*Stage.width;
        t._y = -50;
    }
}

```

Bunny:

```auto
onClipEvent(enterFrame) {
    if(Key.isDown(Key.LEFT)) {
        this._x -= 15;
    }

    if(Key.isDown(Key.RIGHT)) {
        this._x += 15;
    }
}

```

I’m basically asking where and how I should be using the hitTest(). I know the basics of collision detecting but for some reason this code is proving to be real difficult.

Thanks to anyone who helps out!
