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

Drag and drop - 1084Syntas error: expecting identifier before rightparen

New Here ,
Oct 30, 2013 Oct 30, 2013

Copy link to clipboard

Copied

Hi guys!

I am so unbelievable new to flash in general. I need help desperately! I have spent way too long searching google to try and find an answer to this. But I am trying to use drag and drop but my code keeps coming up wtih this error "Scene 1, Layer 'Actions', Frame 1, Line 20, Column 2 1084: Syntax error: expecting identifier before rightparen."

here is the code I am using

Doctor_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);

Doctor_mc.addEventListener(MouseEvent.MOUSE_UP, dropMusic_mc)

function drag (event:MouseEvent)

{

     event.currentTarget.startDrag();

}

function dropDoctor_mc(event:MouseEvent)

{

     stopDrag();

     if(Doctor_mc.hitTestObject(Doctortarget_mc))

     (

          Doctor_mc.x = Doctortarget_mc.x());

          Doctor_mc.y = Doctortarget_mc.y();

     )

}

PLEASE HELP!

TOPICS
ActionScript

Views

2.4K

Translate

Translate

Report

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
Community Expert ,
Oct 30, 2013 Oct 30, 2013

Copy link to clipboard

Copied

these lines:

      Doctor_mc.x = Doctortarget_mc.x());

          Doctor_mc.y = Doctortarget_mc.y();

should be

      Doctor_mc.x = Doctortarget_mc.x;

          Doctor_mc.y = Doctortarget_mc.y;

Votes

Translate

Translate

Report

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 ,
Nov 01, 2013 Nov 01, 2013

Copy link to clipboard

Copied

Thanks Kglad but I entered that and now it has come up with 'scene 1,layer actions, frame 1, line 15, column 34 1084; syntas error: expecting rightparen before semicolon' and 'scene 1, layer actions, frame 1, line 17, column 3 1084: syntax error: expecting identifier before rightparen'

Votes

Translate

Translate

Report

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 ,
Nov 01, 2013 Nov 01, 2013

Copy link to clipboard

Copied

LATEST

One set of parentheses should be curly braces...

     if(Doctor_mc.hitTestObject(Doctortarget_mc))

     {                                                                         //  <-- here

          Doctor_mc.x = Doctortarget_mc.x;

          Doctor_mc.y = Doctortarget_mc.y;

     }                                                                         //  <-- here

Votes

Translate

Translate

Report

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