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

Function does not have a body

New Here ,
Aug 24, 2011 Aug 24, 2011

Hello, i have a problem running this program. an error "function does not have a body" pops up, do you guys know how i can fix this?

stop();

import flash.events.MouseEvent

start_.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void

gotoAndStop(1,"Scene 247");

gotoAndStop(1,"Menu");

TOPICS
ActionScript
3.7K
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 , Aug 24, 2011 Aug 24, 2011

Aside from what what already offered, you cannot gotoAndStop at two different places at the same time, so pick one.

Translate
Community Beginner ,
Aug 24, 2011 Aug 24, 2011

no curly brackets holding the code:

try this

function onClick(event:MouseEvent):void {

gotoAndStop(1,"Scene 247");

gotoAndStop(1,"Menu");

}

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
LEGEND ,
Aug 24, 2011 Aug 24, 2011
LATEST

Aside from what what already offered, you cannot gotoAndStop at two different places at the same time, so pick one.

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