03.21.08

ActionScript Error #1024

Posted in Error, Error, errors, Flash, Flex at 11:05 pm by Curtis J. Morley

ActionScript Error #1024: Overriding a function that is not marked for override.

Description:
AS3 error 1024 means that Flash or Flex already has a function by that name.

Fix:
To solve Flex/Flash Error 1024 all you need to do is either correctly name the function something besides a reserved function in Flex/Flash or properly override the function. The example below shows how to solve issue number one. Notice that the good code solves Error 1024 because it doesn't use the same name as a function that already exists in ActionScript.

Bad Code 1:

function nextFrame (e:MouseEvent):void
{
this.nextFrame();
}

Good Code 1:

function onNextFrame (e:MouseEvent):void
{
this.nextFrame();
}

This should help you resolve Flash / Flex Error #1024

Thanks and as always Happy Flashing

Curtis J. Morley

6 Comments »

  1. Dmitry said,

    April 24, 2008 at 12:03 pm

    You may also get this error if you are using inheritance in AS3 by re-implementing one of the interfaces your base class, a class you extend, also implements. To solve this just use the keyword override in the method declaration.

  2. Curtis J. Morley said,

    May 6, 2008 at 9:35 pm

    Thanks for the pointing this out Dmitry.

    Happy Flashing
    Curtis J. Morley

  3. curtismorley.com » Flex / Flash Error #1151 said,

    May 6, 2008 at 9:44 pm

    […] Related Error(s) : ActionScript Error #1024 […]

  4. curtismorley.com » Flex / Flash Error 1137 said,

    June 2, 2008 at 4:09 pm

    […] Related Error(s) : ActionScript Error #1024 […]

  5. FreeBolik said,

    August 7, 2008 at 8:36 am

    Dmitry thx.

  6. dave.trudes said,

    October 14, 2009 at 6:52 am

    Also a big Thank you !

Leave a Comment