happi_fairy
New Member
Hello!
I have been set an assignment to make a photo viewer with forward and backwards buttons but my code isn't working :/
that is the code ive got but the line it seems to have problems with is the one marked with **
stop ()
btn1.addEventListener (MouseEvent.CLICK, backward);
btn2.addEventListener (MouseEvent.CLICK, forward).
function forward(event:MouseEvent)){ **
if this.currentFrame == this.totalFrames){
gotoAndStop(1);
}
else{
nextFrame();
}
}
function backward(event:MouseEvent){
if this.currentFrame == 1 ){
gotoAndStop(1): this.totalFrames
}
else{
prevFrame();
}
}
any help would be greatly appreciated as I need this completed by monday!
Thank you
xxxx
I have been set an assignment to make a photo viewer with forward and backwards buttons but my code isn't working :/
that is the code ive got but the line it seems to have problems with is the one marked with **
stop ()
btn1.addEventListener (MouseEvent.CLICK, backward);
btn2.addEventListener (MouseEvent.CLICK, forward).
function forward(event:MouseEvent)){ **
if this.currentFrame == this.totalFrames){
gotoAndStop(1);
}
else{
nextFrame();
}
}
function backward(event:MouseEvent){
if this.currentFrame == 1 ){
gotoAndStop(1): this.totalFrames
}
else{
prevFrame();
}
}
any help would be greatly appreciated as I need this completed by monday!
Thank you
xxxx