Hi
I know there are several threads already created for this but I have attempted to change my file to the answers stated and it still doesn’t work!
I have a flash file that runs through 420 frames fading in and out of images (which works) and I want to add on a thumbnail section so users hover over the images and see these thumbnails (which works) and then they can click directly on an image and go straight to that frame (not working).
At the moment, the hovering works but not the button clicking.
This is my AS3 code (image1 - image6 are the instance names of the buttons):
hoverbutton.addEventListener(MouseEvent.ROLL_OVER, onHover);
hoverbutton.addEventListener(MouseEvent.ROLL_OUT, onOut);
image1.addEventListener(MouseEvent.CLICK, onPress1);
image2.addEventListener(MouseEvent.CLICK, onPress2);
image3.addEventListener(MouseEvent.CLICK, onPress3);
image4.addEventListener(MouseEvent.CLICK, onPress4);
image5.addEventListener(MouseEvent.CLICK, onPress5);
image6.addEventListener(MouseEvent.CLICK, onPress6);
function onHover(event:MouseEvent):void{
playback1.alpha = .5;
image1.alpha = 1;
image2.alpha = 1;
image3.alpha = 1;
image4.alpha = 1;
image5.alpha = 1;
image6.alpha = 1;
Mouse.cursor="arrow";
}
function onOut(event:MouseEvent):void{
playback1.alpha = 0;
image1.alpha = 0;
image2.alpha = 0;
image3.alpha = 0;
image4.alpha = 0;
image5.alpha = 0;
image6.alpha = 0;
}
//These functions do not work!
function onPress1(event:MouseEvent):void{
stop();
gotoAndPlay(1);
}
function onPress2(event:MouseEvent):void{
stop();
gotoAndPlay(70);
}
function onPress3(event:MouseEvent):void{
stop();
gotoAndPlay(140);
}
function onPress4(event:MouseEvent):void{
stop();
gotoAndPlay(210);
}
function onPress5(event:MouseEvent):void{
stop();
gotoAndPlay(280);
}
function onPress6(event:MouseEvent):void{
stop();
gotoAndPlay(350);
}
My Flash file is too big to attach therefore you can find it here - http://tinyurl.com/ygdyr5p