Skip to main content
October 15, 2009
Question

Really confused

  • October 15, 2009
  • 2 replies
  • 1337 views

All of this code was working fine about three months ago.  What changed?  I am using a VERY basic function to gotoAndPlay a different frame (identified by a frame label) on a different scene (called"front"):

frontButton.addEventListener(MouseEvent.CLICK, frontClick, false, 0, true);

function frontClick(evt:MouseEvent):void {
    this.gotoAndPlay("start","front");
}

I am getting this compiler error:

Warning: 1060: Migration issue: The method gotoAndPlay is no longer supported.  For more information, see MovieClip.gotoAndPlay()..

This topic has been closed for replies.

2 replies

Inspiring
October 15, 2009

This is not an error but warning. It shouldn't affect anything.

October 15, 2009

I thought that might be the case, but the movie will not advance to the next scene, on click.

October 16, 2009

The only thing that has changed since I opened the file last is that I am now using CS4 instead of CS3.  Would moving from one to the other necessitate changes in code or settings in the API?

October 15, 2009

To attempt to replicate this issue I created a new Flash file and added a simple circle movieclip to the stage in Scene 1 moving from left to right, and a button to switch to Scene 2.  In Scene 2 I used the same clip from the library moving from the lower left to upper right corner, again with a button to switch to Scene 1.  The event listeners for scene switching with the buttons are:

btnSwitch.addEventListener(MouseEvent.CLICK, switchScene1);
function switchScene1(event:MouseEvent) {
this.gotoAndPlay("scene2", "Scene 2");
}

btnSwitch2.addEventListener(MouseEvent.CLICK, switchScene2);
function switchScene2(event:MouseEvent) {
this.gotoAndPlay("scene1", "Scene 1");
}

This is just running from Flash CS3 Professional environment, not compiled and deployed, but it works fine and doesn't give any errors.  Is it possible that somehow your publishing settings were changed to the wrong version of ActionScript?

October 15, 2009

I have the file publishing to Flash 9, AS3?  I am using Flash CS4.  I am also getting this error when I trigger the function via the click:

----

ArgumentError: Error #2109: Frame label start not found in scene front.
    at flash.display::MovieClip/gotoAndPlay()
    at symptomToProtocolAnatomy_fla::MainTimeline/frontClick()

----

But I have triple checked that a.) the frame is labeled correctly, and b.) the scene is titled correctly.  Both are.