Copy link to clipboard
Copied
Hi,
I am very new to Animate and get given an error to this:
button1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
function fl_ClickToGoToScene(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "Scène 3");
}
stop();
Error: 1021 duplicate function definition.
Hoping someone more skilled will be able to tell me what to do Thanks in advance
Copy link to clipboard
Copied
That error is telling you that you have more than one function named fl_ClickToGoToScene() in your movie file. Each function has to have a unique name. So, if you are using this code snippet more than once in your movie, then you should append something to the name to make it unique. You could append a number like: fl_ClickToGoToScene1() for instance.
Copy link to clipboard
Copied
In your Publish Settings is an option to Allow Debugging. Check that box, then the error should tell you what line to look for to fix the problem.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now