# \[Flash8\]Help needed! in pausing script. Look at this thread please!

**URL:** <https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185>\
**Category:** flash\
**Created:** [May 23, 2008, 10:56pm UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185 "2008-05-23T22:56:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrdoodle](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mrdoodle](https://forum.kirupa.com/u/mrdoodle)\
**Post date:** [May 23, 2008, 10:56pm UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/1 "2008-05-23T22:56:46Z")

</div>

Hi again forum folk,

Please can someone coment on this post. Every othere post seems to have loads of people viewing them and replying and no one is even looking at my posts. Why?

Anyway I have this script below that is attached to a button called Espanol\_but that when the button is clicked(released) moves itself and several other buttons and movie clips around the stage using the tweenClass.

```auto

on (release) {
import mx.transitions.*;
import mx.transitions.easing.*;

// Espanol_nut jumps to the ground
    twnBezX = new BezierTween(EspanolNut, "_x", 119.5, 0, 7, false, 120, 70);
    twnBezY = new BezierTween(EspanolNut, "_y", 135.2, 460, 7, false, -50, 200);
    twnBezX._tl = this;
    twnBezX.onMotionFinished = function(){
    this._tl.tweenDone();
}

***PAUSE*** 

//Language buttons bounce off stage to the left
    var xPosT:Tween = new Tween(Espanol_but, "_x", Elastic.easeInOut, 117.1, -500, 2.7, true);
    var xScaleT:Tween = new Tween(Espanol_but, "_rotation", Elastic.easeInOut, 0, 360, 4, true);

    var xPosT:Tween = new Tween(Francais_but, "_x", Elastic.easeInOut, 322.1, -500, 1.7, true);
    var xScaleT:Tween = new Tween(Francais_but, "_rotation", Elastic.easeInOut, 0, 360, 2.5, true);

    var xPosT:Tween = new Tween(Deutsch_but, "_x", Elastic.easeInOut, 527.5, -500, 3.2, true);
    var xScaleT:Tween = new Tween(Deutsch_but, "_rotation", Elastic.easeInOut, 0, 360, 4.5, true);

***PAUSE*** 

//Francais & Deutsch nuts bounce off stage to the left
    var xPosT:Tween = new Tween(FrancaisNut, "_x", Elastic.easeInOut, 324.4, -500, 1.7, true);
    var xScaleT:Tween = new Tween(FrancaisNut, "_rotation", Elastic.easeInOut, 0, 360, 2.5, true);
    
    var xPosT:Tween = new Tween(DeutschNut, "_x", Elastic.easeInOut, 529.9, -500, 2.7, true);
    var xScaleT:Tween = new Tween(DeutschNut, "_rotation", Elastic.easeInOut, 0, 360, 4, true);

***PAUSE*** 

//Year buttons bounce on from right of stage   
    var xScaleT:Tween = new Tween(Year4, "_rotation", Elastic.easeInOut, 90, 0, 3.5, true);
    var xPosT:Tween = new Tween(Year4, "_x", Elastic.easeInOut, 1200, 416.9, 3.5, true);

    var xScaleT:Tween = new Tween(Year3, "_rotation", Elastic.easeInOut, 90, 0, 2.5, true);
    var xPosT:Tween = new Tween(Year3, "_x", Elastic.easeInOut, 1200, 167.4, 2.5, true);

    var xScaleT:Tween = new Tween(Year6, "_rotation", Elastic.easeInOut, 90, 0, 3.9, true);
    var xPosT:Tween = new Tween(Year6, "_x", Elastic.easeInOut, 1200, 416.9, 4, true);

    var xScaleT:Tween = new Tween(Year5, "_rotation", Elastic.easeInOut, 90, 0, 2.9, true);
    var xPosT:Tween = new Tween(Year5, "_x", Elastic.easeInOut, 1200, 167.4, 3, true);
}

```

Right…What I want to do is pause the executiuon of the code for about 2 seconds at each point that i’ve marked the code above with the word _ **PAUSE** _.  
That way there is a slight lag between each of the buttons and movie clips animating around the stage.

Please can someone help me wih the code I need to make this happen, as I don’t really understand AS too well and need to get this working.

Thanks so much in advance if you can help me with the code I need.

mrdoodle 👁

---

<div class="post-metadata">

**Author:** ![Loyx](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Loyx](https://forum.kirupa.com/u/Loyx)\
**Post date:** [May 24, 2008, 12:19am UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/2 "2008-05-24T00:19:54Z")

</div>

Why dont you make a 2 seconds tween with an “invisible mc”… It isnt the best solution but is efective… xD

---

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [May 24, 2008, 12:29am UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/3 "2008-05-24T00:29:17Z")

</div>

You could use _setTimeout[FONT=monospace].[/FONT]_

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [May 24, 2008, 12:39am UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/4 "2008-05-24T00:39:42Z")

</div>

[quote=mrdoodle;2330337]Every othere post seems to have loads of people viewing them and replying and no one is even looking at my posts. Why?

[/quote]

Possibly because it’s been cross-posted across so many different forums…

---

<div class="post-metadata">

**Author:** ![Loyx](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Loyx](https://forum.kirupa.com/u/Loyx)\
**Post date:** [May 24, 2008, 9:58am UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/5 "2008-05-24T09:58:17Z")

</div>

> [@Krilnon;2330361](#):
>
> You could use _setTimeout[FONT=monospace].[/FONT]_

Mmm… That’s the best solution! xD

(I didn’t know that function, for these issues I always used _setInterval_)

---

<div class="post-metadata">

**Author:** ![mrdoodle](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mrdoodle](https://forum.kirupa.com/u/mrdoodle)\
**Post date:** [May 27, 2008, 8:36am UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/6 "2008-05-27T08:36:35Z")

</div>

> [@Krilnon;2330361](#):
>
> You could use _setTimeout[FONT=monospace].[/FONT]_

Great… but how? I have tried googling it to find more information, but it all just goes straight over my head. I am not a programmer by any means, and I just don’t understand all this stuff. The original code I had I took from a tutorial and just changed the values. Very simple.

Please excuse my ignorance, but you must understand that not everyone knows how to implement all this code. It would really help me if you could provide me with a working example of this _setTimeout_ thing, relevant to what I am doing, that I could just paste into my existing code.

I look forward to your response.

Thanks :party:

Mike

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [May 27, 2008, 9:13pm UTC](https://forum.kirupa.com/t/flash8-help-needed-in-pausing-script-look-at-this-thread-please/261185/7 "2008-05-27T21:13:20Z")

</div>

Try searching this forum on the phrase “setTimeout” and you’ll find loads of practical examples. Try a search on “setInterval” too or, better still, look in the identical thread you posted elsewhere for the step-by-step example that I provided for you.
