I'm trying to link buttons from a homepage to individual pages though it isn't working, whenever I change it the pages flick through continuously in a cycle. Help!
Coding:
1homeb.addEventListener (MouseEvent.CLICK,gotoAndStop [1, "Scene 4"]) ;
mhomeb.addEventListener (MouseEvent.CLICK,gotoAndStop [1, "Scene 5"]) ;
dhomeb.addEventListener (MouseEvent.CLICK,gotoAndStop [1, "Scene 3"]) ;
abouthomeb.addEventListener (MouseEvent.CLICK,gotoAndStop [1, "Scene 2"]) ;
Reference error is Error:#1069: Property Scene 4 not found on number and there is no default value
at homepage_fla::MainTimeline/frame1 ()
Any help will be appreciated...
You cannot specify event listeners that way and your gotoAndPlay/Stop 's are written incorrectly as well (no brackets). Also, you should not be naming instances starting with numeric characters. You are best off avoiding try to shortcut the code. For each button your should have code like the following...
homeb.addEventListener (MouseEvent.CLICK, homebClicked);
function homebClicked(evt:MouseEvent):void {
gotoAndStop(1, "Scene 4") ;
}
Thankyou that was extremely helpful I can see I have got my coding all wrong.
I'm now getting another problem;
again on my homepage it is coming up with the same error but now for scene 1 instead of 4.
also the gotoAndStop (); I have at the begging of this scene, I have entered a frame number (1); but it tells me that expected number of arguments is 0.
North America
Europe, Middle East and Africa
Asia Pacific