[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5555
  • Last Modified:

ArgumentError: Error #2108: Scene Scene 1 was not found.

I am using AS 3.0, with Flash CS4.

I have added the below line of code that calls an instance of a movie clip ("mvJigsaw") and plays from frame 'mvstart' which is the start of the clip.

When I play the movie, it does run, and the movie clip works, but in the background I get this error:

ArgumentError: Error #2108: Scene Scene 1 was not found.
      at flash.display::MovieClip/gotoAndPlay()
      at chris_fla::MainTimeline/frame10()
      at flash.display::MovieClip/gotoAndPlay()
      at chris_fla::MainTimeline/buttonClickHandler5()

I understand what it is saying - there is no 'Scene 1' in the instance of my movie clip.

If I try leaving 'Scene 1' out, ie. mvJigsaw.gotoAndPlay("mvstart", null);, the movie runs, but the movie clip instance doesn't.

How can I add a scene to the movie clip instance, so that I can make reference to it?

Thanks!

mvJigsaw.gotoAndPlay("mvstart", "Scene 1");

Open in new window

0
turpya
Asked:
turpya
  • 2
1 Solution
 
biyikCommented:
If you don't have more than 1 scene, using
mvJigsaw.gotoAndPlay("mvstart");
should be enough.
Also, Shift+F2 opens the Scene panel.
0
 
turpyaAuthor Commented:
On frame 1 I have an event listner for a mouse click. When the button is pressed it should go to frame 5. On frame 5 I have the movie clip instance called 'mvJigsaw', and the script to load it.

When I run the flash animation and try and click on the button, nothing is happening. Does something look wrong here?

Ta.
// frame 1...
 
btnBG.addEventListener(MouseEvent.CLICK, buttonClickHandler5);
function buttonClickHandler5(event:MouseEvent):void {
gotoAndPlay(5);
}
stop();
 
 
// frame 5....
 
mvJigsaw.gotoAndPlay("mvstart");

Open in new window

0
 
turpyaAuthor Commented:
fixed it..
//frame 1
 
stop();
btnBG.addEventListener(MouseEvent.CLICK, buttonClickHandler5);
function buttonClickHandler5(event:MouseEvent):void {
gotoAndStop(5);
}
 
 
//frame 5...
mvJigsaw.gotoAndStop("mvstart");

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now