# A pause issue

**URL:** <https://forum.kirupa.com/t/a-pause-issue/28787>\
**Category:** Uncategorized\
**Created:** [August 18, 2003, 4:33pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787 "2003-08-18T16:33:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [August 18, 2003, 4:33pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/1 "2003-08-18T16:33:32Z")

</div>

stop();  
offset = 2;  
timerInt = getTimer();  
initialTimer = timerInt+offset\*1000;  
onEnterFrame = function () {  
currentTimer = getTimer()-initialTimer;  
if (currentTimer\>=timerInt) {  
play();  
}  
};

allows a pause that works perfectly, as I have a shape tween mask that reveals a photograph, and then uses a mask to reveal a second image. However I place a stop(); at the last frame, and for some strange reason the effect repeats itself, dispite my stop action at the end frame. Any ideas you guru’s?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 5:08pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/2 "2003-08-18T17:08:26Z")

</div>

[AS]if (currentTimer\>=timerInt) {  
play();  
delete onEnterFrame;  
}[/AS]  
??

And please use [**AS][**/AS] tags when posting code. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 5:20pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/3 "2003-08-18T17:20:43Z")

</div>

Hi Kax, sorry for not using the tags it will not happen again :).

ok I applied the script to the last keyframe but yet it still continues the process repeating? What am I doing wrong, I have placed the scripts in a layer above the effect called actions. Is this the problem, should I place it on the end of the object keyframe ? - well i will try, but do you have any other ideas? and thanks for your reply.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 5:27pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/4 "2003-08-18T17:27:26Z")

</div>

You’re not supposed to put the code in the last keyFrame, you are supposed to put it within the onEnterFrame handler!! :whistle:  
[AS]stop();  
offset = 2;  
timerInt = getTimer();  
initialTimer = timerInt+offset\*1000;  
onEnterFrame = function () {  
currentTimer = getTimer()-initialTimer;  
if (currentTimer\>=timerInt) {  
play();  
**delete onEnterFrame;**  
}  
};[/AS]  
If it still doesn’t work, could you attach the FLA?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 5:35pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/5 "2003-08-18T17:35:57Z")

</div>

thats great thank you. And go easy, I am trying my best with this as, but unless your a programmer it is difficult.

Also if you can help me. I have create a movie clip, and after that movie clip placed some action script as follows

[AS]

\_root[“letterBox”].gotoAndplay(2);

[/AS]

it appears to work correctly, but for some reason it only plays some of the effect. i.e a picture has an alpha value in a motion tween of 1 to 99% due to a bug in flashapparently, and it plays but only up to an 80% alpha, is the code I am doing right? or have I missed some action script out. basically when one movie clip has finished I require it to play another clip in the \_root.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 5:38pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/6 "2003-08-18T17:38:12Z")

</div>

its ok about that Kax, It worked the second time around, but is this the correct procedure involved. This will be the first flash site I have developed so I really do need to make sure I am doing everything the way it should rather than just looks ok if you follow 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2003, 11:04pm UTC](https://forum.kirupa.com/t/a-pause-issue/28787/7 "2003-08-18T23:04:54Z")

</div>

OK… I’m confused. 😛

What procedure!? The pause thing? I’d use something like this: [http://www.kirupaforum.com/forums/showthread.php?s=&postid=267933#post267933](http://www.kirupaforum.com/forums/showthread.php?s=&postid=267933#post267933). But as long as it works, I guess it’s ok. 😛
