ActionScript Error 1136: Incorrect number of arguments. Expected 1.

1136: Incorrect number of arguments.  Expected 1.

ActionScript 3 Error #1136 Description:
This is a generic yet simple ActionScript Error.  It just means that you need one and only one argument in the method you are calling.  This error will pop up in many cases but I will only provide one code example. It should help you get through this fairly easily.

Flex / Flash Error 1136 Fix:
Add the applicable argument/parameter into the parenthesis.

Bad Code:

newempty1.removeChild();

Good Code:

newempty1.removeChild(pic1);

This should help you resolve Flex / Flash Error #1136

Thanks and as always Happy Flashing

Curtis J. Morley

AS3 Error 1120

ActionScript 3 Error #1120: Access of undefined property myButton_btn.

Description:
ActionScript error #1120 means that an object “property” within Flash or Flex is not defined. But this doesn’t really help you fix it. One main reason for this AS3 Error is that you haven’t given the MovieClip or Button an instance name when you placed it on the stage in Flash. Another reason is that the reference is not correct.

AS3 Error 1120 –Fix1:
Give your instances a proper instance name.

Bad Example:

Flash properties dialog without an instance name Flash properties dialog without an instance name

Good Example:

Flash Properties Dialog with Instance Name Flash properties dialog with MovieClip instance name

ActionScript 3 Error #1120: Access of undefined property myBatton_btn.

AS3 Error 1120 –Fix2:
Check that your reference is the proper instance name.

Bad Code:

myBatton_btn.addEventListener(MouseEvent.CLICK, someFunction);

Good Code:

myButton_btn.addEventListener(MouseEvent.CLICK, someFunction);

 

ActionScript 3 Error #1120: Access of undefined property ftouchBeginHandler.

AS3 Error 1120 – Fix3:
Make sure that you are calling the function with the correct name.

Bad Code:

square.addEventListener(TouchEvent.TOUCH_BEGIN, touchBeginHandler);
function fl_TouchBeginHandler(event:TouchEvent):void
{
//Drag something
}

Good Code:

square.addEventListener(TouchEvent.TOUCH_BEGIN, touchBeginHandler);
function touchBeginHandler(event:TouchEvent):void
{
//Drag something
}

 

This should help you fix Flash AS3 Error #1120.

As Always, Happy Flashing

Curtis J Morley

Flex / Flash ActionScript Error #1065

ActionScript Error #1065: Variable MyClassName is not defined.

Description:
This ActionScript error means that Flash or Flex does not understand the definition of your Class. One reason for this is that you forgot to declare your class as public. Another reason is that the reference is not correct. Don’t be deceived by the word Variable in this error it is really a class.

Fix:
Add public before the name of your class.

Bad Code:

class MyClassName extends MovieClip

Good Code:

public class MyClassName extends MovieClip

Fix 2:

Correctly reference the class that is being used.

Good luck trouble shooting ActionScript Error #1065 and,
As always Happy Flashing