Flash CS3 / Flex AS3 Error #1053

ActionScript Error #1053: Accessor types must match.

Description:
This is a great error that has absolutely no documentation. This is what Adobe has to say about it.

The non-error error.  ActionScript Error #1053 from Adobe Live Docs
Notice how the right side of the image doesn’t have any text at all. It is simply left blank. To understand this error you need to understand what an ‘Accessor’ is. An ‘Accessor’ is a ‘Getter’ that accompanies a ‘Setter’. The reason it is called an ‘Accessor’ is because it accesses the variable set using a ‘Setter’.

So what does that mean for you. This error means that the Getter(Accessor) is not set as the same Type as the Setter.

Fix:
Make sure that whatever you return in the ‘Getter’ is the same ‘Type’ as what is set in the ‘Setter’.

Bad Code:

function get sClickable():String {
return _clickable.toString();
}
function set sClickable(myClickable:Boolean):void {
this._clickable=myClickable;
}

Good Code:

public function get sClickable():Boolean {
return _clickable;
}
public function set sClickable(myClickable:Boolean):void {
this._clickable=myClickable;
}

So now you know how to solve ActionScript Error #1053.

As Always Happy Flashing.

8 thoughts on “Flash CS3 / Flex AS3 Error #1053

  1. Thanks so much! I am moving an application from Flex3 to Flex4 and have encounter this every where. I didn’t realize I was doing it wrong, so you explanation was a huge help.
    Thanks again – Cheers,
    Steve

  2. Just encountered this error. FlashCS3 Help was no help so Google led me here. Great tip. Simple and concise. Solved my problem. Thank you so very much!

  3. Thanks for the tip. Simple, and straight to the point. Flex Builder had me gazing at the monitor for a couple minutes trying to figure out what the hell I was doing wrong, hehehe.

  4. Thanks Brady. Good to hear from you again. Hope things are going well. Thanks for the tip on the CSS. That is the way it is designed. If you have a quick fix that would push it over I would love to try it.

    Thanks,
    Curtis J. Morley

  5. Curtis, thanks for the post, helped me know what this error was. You are #1 on google for this error 😉 Just an FYI, regarding your blog’s css design, the inset drop shadow box around your content is overlapping into your navigation on the right in Firefox on PC.

Comments are closed.