Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error:1021 Duplicate Function Definition

New Here ,
May 04, 2011 May 04, 2011

Hi Everyone,

I have several buttons in my project which I have coded like the one  below, I had them all working but have come back to my project and are  receiving the error:1021 Duplicate Function Definition



stop();
btn_start_session.addEventListener(MouseEvent.MOUSE_DOWN, myBtnHandler13);
function myBtnHandler13(event:MouseEvent):void {
gotoAndStop(1, "Open_Live");
}

I also have multiple scenes within the project some with multiple buttons per page.

TOPICS
ActionScript
6.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 04, 2011 May 04, 2011

Somewhere you are using the same function name for more than one function.

Translate
LEGEND ,
May 04, 2011 May 04, 2011

Somewhere you are using the same function name for more than one function.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 05, 2011 May 05, 2011

In someother frames or scenes you have the same function name. Ctrl+F to find with the name "myBtnHandler13"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 09, 2011 Jun 09, 2011
LATEST

If you are 100% sure you have no duplications, it may just be your Actionscript 3 file. I had this same thing happen to me last night, I spent HOURS trying to figure out the issue...I knew there were NO duplications in my actionscript files. SO I created a new Actionscript 3 file and reinputted all my include files and everything worked again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines