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

ERROR 1119

New Here ,
Nov 10, 2014 Nov 10, 2014

I have these script on my flash file, but still got that errors. I'm on my school project, and I'm not into ActionScript nor Flash before. Please help me.

Scene 1, Layer 'action', Frame 1, Line 23

1119: Access of possibly undefined property Q through a reference with static type Class.

Scene 1, Layer 'action', Frame 1, Line 24

1119: Access of possibly undefined property W through a reference with static type Class.

Scene 1, Layer 'action', Frame 1, Line 251119: Access of possibly undefined property E through a reference with static type Class.

stop();

fscommand("fullscreen","true")

var kanan:Boolean = false;

var kiri:Boolean = false;

var lompat:Boolean = false;

var jongkok:Boolean = false;

var dance:Boolean = false;

var blower:Boolean = false;

var balon:Boolean = false;

var jumlah:int = 0;

pipi.addEventListener (Event.ENTER_FRAME,bergerak);

stage.addEventListener (KeyboardEvent.KEY_DOWN, tekantombol);

stage.addEventListener (KeyboardEvent.KEY_UP, lepastombol);

function tekantombol (event:KeyboardEvent):void{

  switch (event.keyCode){

  case Keyboard.RIGHT :{kanan = true;break;}

  case Keyboard.LEFT :{kiri = true;break;}

  case Keyboard.UP :{lompat = true;break;}

  case Keyboard.DOWN :{jongkok = true;break;}

  case Keyboard.Q :{dance = true;break;}

  case Keyboard.W :{blower = true;break;}

  case Keyboard.E :{balon = true;break;}

  }

}

function lepastombol (event:KeyboardEvent):void{

  switch (event.keyCode){

  case Keyboard.RIGHT :{kanan = false;break;}

  case Keyboard.LEFT :{kiri = false;break;}

  case Keyboard.UP :{lompat = false;break;}

  case Keyboard.DOWN :{jongkok = false;break;}

  case Keyboard.Q :{dance = false;break;}

  case Keyboard.W :{blower = false;break;}

  case Keyboard.E :{balon = false;break;}

  }

}

function bergerak (event:Event){

  pipi.x+=jumlah;

  if(pipi.x>=850){pipi.x=-8;}

  if(pipi.x<=-150){pipi.x=820;}

  if (kanan){pipi.gotoAndStop(3); jumlah=4;}

  if (kiri){pipi.gotoAndStop(2); jumlah=-4;}

  if (lompat){pipi.gotoAndStop(4); jumlah=0;}

  if (jongkok){pipi.gotoAndStop(5); jumlah=0;}

  if (dance){pipi.gotoAndStop(6); jumlah=0;}

  if (blower){pipi.gotoAndStop(7); jumlah=0;}

  if (balon){pipi.gotoAndStop(8); jumlah=0;}

}

I have these script on my flash file, but still got that errors. I on my school project, and I'm not into ActionScript nor Flash before. Please help me.

TOPICS
ActionScript
454
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 , Nov 10, 2014 Nov 10, 2014

Try using the integer value instead of the constant....

replace Keyboard.Q with 81

replace Keyboard.W with 87

replace Keyboard.E with 69

Translate
LEGEND ,
Nov 10, 2014 Nov 10, 2014

Try using the integer value instead of the constant....

replace Keyboard.Q with 81

replace Keyboard.W with 87

replace Keyboard.E with 69

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 ,
Nov 10, 2014 Nov 10, 2014

Thanks a lot! It worked.

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 ,
Nov 10, 2014 Nov 10, 2014
LATEST

You're welcome

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
Community Expert ,
Nov 10, 2014 Nov 10, 2014

i don't see any problems with the code you showed.

double check frame 1 line 23 in your action layer.

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