Jump to content

Moving From One Scene To Another Using Button Problem AS3


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 post
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 post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...