zille Posted November 14, 2013 Share Posted November 14, 2013 (edited) I have made a small quiz application in flash. Beginner. I have added this code for "Select Country" button : scountry.addEventListener(MouseEvent.CLICK, goscountry);function goscountry(event:MouseEvent):void{ gotoAndPlay(1, "Map");} I get error So I tried this: ArgumentError: Error #2108: Scene Map was not found. at flash.display::MovieClip/gotoAndPlay() at Assignment1_Menu_fla::MainTimeline/fl_ClickToGoToScene_9() scountry.addEventListener(MouseEvent.CLICK, goscountry);function goscountry(event:MouseEvent):void{ gotoAndPlay(1, "Map");} I get error again: ArgumentError: Error #2108: Scene Map was not found.at flash.display::MovieClip/gotoAndPlay()at Assignment1_Menu_fla::Nav1_4/goscountry() Can anyone help me linking the Map Scene with button "Select Country" button in Main Scene. The project file is attached: Natok (27MB) Edited November 14, 2013 by zille Link to comment Share on other sites More sharing options...
justsomeguy Posted November 15, 2013 Share Posted November 15, 2013 Those 2 pieces of code are the same. I haven't downloaded the 27MB project file, but you might not be targeting the correct movie clip with gotoAndPlay. Normally you would specify a movie clip with that, like _parent.gotoAndPlay or _root.gotoAndPlay, or the instance name of an existing movie clip. Link to comment Share on other sites More sharing options...
Ingolme Posted November 15, 2013 Share Posted November 15, 2013 Is the scene called "Map" or is it something else, like "map" or "MAP"? Link to comment Share on other sites More sharing options...
zille Posted November 24, 2013 Author Share Posted November 24, 2013 Actually my code was correct. I was click on "Test Scene" and button not working but when I clicked on "Test Movie" it was working fine. Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now