Jump to content

Moving From One Scene To Another Using Button Problem AS3


zille

Recommended Posts

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 by zille
Link to comment
Share on other sites

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...