button only works once because of play backward script?
i want to play a mc once forewards, once backwards
unfortunately it only works forwart - stops on the last frame, because there is a this.stop(); then i click on the back-button which works ok - but then after it played backwards - nothing works anymore. the buttons are not active anymore.
does anybody know, where i do the mistake?
my script looks like this
this.stop();
var maxframe = 43;
function playReverse()
{
maxframe--;
this.gotoAndStop(maxframe);
}
//button vorwärts-button
this.button_forward.addEventListener("click", nextFrame.bind(this));
function nextFrame()
{
var frameNumber = this.currentFrame;
this.gotoAndPlay(frameNumber + 1);
this.frameNumber.stop(43);
}
//button rückwärts-button
this.button_back.addEventListener("click", prevFrame.bind(this));
function prevFrame()
{
this.addEventListener('tick', playReverse.bind(this))
this.playReverse();
}
