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:
Good Example:
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