# my\_mc.stop doesn't work

**URL:** https://forum.kirupa.com/t/my-mc-stop-doesnt-work/283007
**Category:** Uncategorized
**Created:** [March 1, 2009, 9:25am UTC](https://forum.kirupa.com/t/my-mc-stop-doesnt-work/283007 "2009-03-01T09:25:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Maz83](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Maz83](https://forum.kirupa.com/u/Maz83)
#### Post date: [March 1, 2009, 9:25am UTC](https://forum.kirupa.com/t/my-mc-stop-doesnt-work/283007/1 "2009-03-01T09:25:53Z")

</div>

I have an animation with 11 layers, 4 of them have a regular time line, 4 others have a actionscript animation(moving left to right and replacing left when disappear(they are clouds)), 1 other is just a layers for actions, and the last 2 contains a MovieClip named “fond\_mc” and “verdure\_mc”(i’m french, in english: “background\_mc” and “grass\_mc”).

my script is:

```auto
fond_mc.stop();
verdure_mc.stop();
nuage1_mc.addEventListener(Event.ACTIVATE, initialisation); // nuage = cloud
nuage4_mc.addEventListener(Event.ACTIVATE, initialisation);
nuage2_mc.addEventListener(Event.ACTIVATE, initialisation);
nuage3_mc.addEventListener(Event.ACTIVATE, initialisation);
function initialisation(e:Event):void {
    e.currentTarget.vitesse = Math.floor(Math.random()*4)+1; // Génération d'un nombre entre 1 et 4 (compris)
    var positionDepart:Number = Math.floor(Math.random()*990); // Génération d'un nombre entre 0 et 990
    e.currentTarget.x = positionDepart;
    e.currentTarget.addEventListener(Event.ENTER_FRAME, mouvement);
}
function mouvement(e:Event):void {
    if(e.currentTarget.x <= 990)
        e.currentTarget.x += e.currentTarget.vitesse;
    else {
        e.currentTarget.vitesse = Math.floor(Math.random()*4)+1; // Génération d'un nombre entre 1 et 4 (compris)
        e.currentTarget.x = - Math.floor(Math.random()*100) - e.currentTarget.width;
    }
}

```

The first 2 lines is freaking me of cause they don’t work like they should, and fond\_mc and verdure\_mc keep playing.

Any ideas?
