Hi,
I’m re-designing my website in Flash CS4. There will be 6 buttons when it is finished. I have created 6 movieclips that fades in the text when you click on each button. What I’m trying to do is make the movieclip play backwards when a different button is clicked so the text fades back out before the new text fades in. I think I’ve nearly got it. I googled the effect and found the below action script. I’ve put it on the first button to see if it works, but I get the error messages at the bottom. Can anyone help?
WelcomeButton.onRelease = function() {
startRewind (29);
};
function rewindMovieClip (targetFrame) {
var currentPosition = mcLoader._currentframe;
var targetPosition = targetFrame;
var frameDiff = currentPosition - targetPosition;
if (frameDiff > 0) {
mcLoader.prevFrame();
}
else {
clearInterval (intervalID);
}
}
function startRewind (targetFrame) {
var docFPS = 12;
var mySpeed = 1000/12
intervalID = setInterval (rewindMovieClip, mySpeed, targetFrame);
loader.loadMovie(“WelcomeText.swf”);
}
I keep getting these error messages:
Scene=Scene 1, layer=Welcome, frame=142, Line 1 - Statement must appear within on handler