Skip to main content
Participant
June 5, 2013
Question

Expecting rightparen before colon

  • June 5, 2013
  • 1 reply
  • 434 views

I am making a turn based rpg game in actionscript 3 but I am a beginner and I am having some problems.

error 1084: expecting rightparen before colon.

Here is my code:

import flash.events.MouseEvent;

stop();

next.addEventListener(MouseEvent.CLICK, nextbutton)

function nextbutton(event:MouseEvent):void

{

          nextFrame()

          addChildAt(Fight:DisplayObject, frame:9);DisplayObject - DisplayObjectContainer

          stop();

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
June 5, 2013

THe problem is likely with the following line.  Look up the addChildAt method and see how to specify its arguments.  

addChildAt(Fight:DisplayObject, frame:9);DisplayObject - DisplayObjectContainer

Whatever that "DisplayObject - DisplayObjectContainer" is doing at the end, it doesn't belong there, or anywhere... it is not valid code.