A pause issue

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?

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

And please use [AS][/AS] tags when posting code. :stuck_out_tongue:

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.

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?

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.

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 :slight_smile:

OK… I’m confused. :stuck_out_tongue:

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