# (MX) attachMovie with countdown help!

**URL:** <https://forum.kirupa.com/t/mx-attachmovie-with-countdown-help/296050>\
**Category:** flash\
**Created:** [September 9, 2009, 2:50am UTC](https://forum.kirupa.com/t/mx-attachmovie-with-countdown-help/296050 "2009-09-09T02:50:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![genericguy](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@genericguy](https://forum.kirupa.com/u/genericguy)\
**Post date:** [September 9, 2009, 2:50am UTC](https://forum.kirupa.com/t/mx-attachmovie-with-countdown-help/296050/1 "2009-09-09T02:50:58Z")

</div>

Thanks for the help in advance…

I am new to actionscript and am trying to figure out how to do two things.

1. attachMovie when the level.text is at 2.
2. give that attached movie properties (movement)

this is my code. you can see what i am trying to do but it is not working. this code is on the first frame of my timeline.

thanks again.

```auto
level.text = 1;
var flake:MovieClip;
function fallAndDelete() {
    this._y += 2;
    if (this._y>300) {
        this.removeMovieClip();
    }
}
if (level.text == 2) {
    flake = this.attachMovie("flake", "f", 0, {_x:100, _y:100});
}
flake.onEnterFrame = fallAndDelete;
tm = 20;
displayTime.text = tm;
function countDown() {
    tm--;
    displayTime.text = tm;
    if (tm == 0) {
        tm = 21;
        level.text++;
    }
}
timer = setInterval(countDown, 1000);

```
