Hello I'm trying to make a flash website that that has menus. But the problem is gotoAndStop(); doesn't work after transferring to another frame making it impossible to select items in that sub menu. Here's what I'm talking about.
Let's say I picked flash works, and it goes to that frame, after that i can't select any of the items in the second image even though I already have an event listener to it.
First image:
Second Image: I can't click anything on this part. This is what appears when I click flash works.
Here's my code.
//this is the flash works button
flashworks_btn.addEventListener(MouseEvent.CLICK, goflashworks);
function goflashworks(event:MouseEvent):void{
gotoAndStop(2);
}
//let's say i picked basic animation
basicanimation_btn.addEventListener(MouseEvent.CLICK, gobasicanimation);
function gobasicanimation(event:MouseEvent):void{
gotoAndStop(10);
}
EDIT
import flash.events.MouseEvent;
stop();
//homepage
home_btn.addEventListener(MouseEvent.CLICK, gohome);
flashworks_btn.addEventListener(MouseEvent.CLICK, goflashworks);
aboutdev_btn.addEventListener(MouseEvent.CLICK, goaboutdev);
//flashworks
basicanimation_btn.addEventListener(MouseEvent.CLICK, gobasicanimation);
layersandsymbols_btn.addEventListener(MouseEvent.CLICK, golayersandsymbols);
interactive_btn.addEventListener(MouseEvent.CLICK, gointeractivebutton);
//about developer
profile1_btn.addEventListener(MouseEvent.CLICK, goprofile1);
profile2_btn.addEventListener(MouseEvent.CLICK, goprofile2);
//basic animation
shapetween_btn.addEventListener(MouseEvent.CLICK, goshapetween);
motiontween_btn.addEventListener(MouseEvent.CLICK, gomotiontween);
classictween_btn.addEventListener(MouseEvent.CLICK, goclassictween);
back_flashworks_btn.addEventListener(MouseEvent.CLICK, goback_flashworks);
//layers and symbols
guidelayer_btn.addEventListener(MouseEvent.CLICK, goguidelayer);
masklayer_btn.addEventListener(MouseEvent.CLICK, gomasklayer);
//amazing effect button
amazingbuttoneffect_btn.addEventListener(MouseEvent.CLICK, gobuttoneffect);
//function home page
function gohome(event:MouseEvent):void{
gotoAndStop(1);
}
function goflashworks(event:MouseEvent):void{
gotoAndStop(2);
}
function goaboutdev(event:MouseEvent):void{
gotoAndStop(3);
}
//function flashworks
function gobasicanimation(event:MouseEvent):void{
gotoAndStop(10);
}
function golayersandsymbols(event:MouseEvent):void{
gotoAndStop(11);
}
function gointeractivebutton(event:MouseEvent):void{
gotoAndStop(12);
}
//function about developer
function goprofile1(event:MouseEvent):void{
gotoAndStop(13);
}
function goprofile2(event:MouseEvent):void{
gotoAndStop(14);
}
//basic animation function
function goshapetween(event:MouseEvent):void{
gotoAndStop(20);
}
function gomotiontween(event:MouseEvent):void{
gotoAndStop(21);
}
function goclassictween(event:MouseEvent):void{
gotoAndStop(22);
}
function goback_flashworks(event:MouseEvent):void{
gotoAndStop(2);
}
//layers and symbols function
function goguidelayer(event:MouseEvent):void{
gotoAndStop(23);
}
function gomasklayer(event:MouseEvent):void{
gotoAndStop(24);
}
//interactive button function
function gobuttoneffect(event:MouseEvent):void{
gotoAndStop(25);
}
Thank you, I managed to solve the problem. It turns out that I need to separate the action script of the buttons in the different frames in my project, because the first thing I did before I solved it is that I put all the button instances in only one frame of the action script layer.