Skip navigation
nomadic_cupcake
Currently Being Moderated

ReferenceError: Error #1065 and ArgumentError: Error #2025:

Dec 5, 2010 6:25 PM

I keep getting them, and can't figure out where or why I'm getting them.

Here's the full error reports:

 

ReferenceError: Error #1065: Variable EverybodyEditsBeta is not defined.
    at global/flash.utils::getDefinitionByName()
    at Function/<anonymous>()


ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at Function/<anonymous>()

 

I get the Argument error over a hundred times. It's exactly the same.

 

What can I do?

 
Replies
  • Currently Being Moderated
    Dec 5, 2010 6:48 PM   in reply to nomadic_cupcake

    If you want some help you'll have to show the relevant code.  Don't post everything unless it is a small bit in itself.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 7:24 PM   in reply to nomadic_cupcake

    if EverybodyEditsBeta has a package name then you need to include that in arguments = Class(getDefinitionByName("EverybodyEditsBeta"));

     

    eg: arguments = Class(getDefinitionByName("myPackageName.mySubPackageName.EverybodyEd itsBeta"));

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 7:38 PM   in reply to nomadic_cupcake

    I can't see where arguments is a declared variable, so that might be a problem... or I'm just missing it.  I suspect the removeChild error stems from not removing the ENTER_FRAME listener such that it keeps firing the line... removeChild(loader);

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 8:09 PM   in reply to nomadic_cupcake

    do you have arguments defined as Ned asked?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 9:07 PM   in reply to nomadic_cupcake

    you need public var arguments:Class; after public class loader extends MovieClip {

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 9:09 PM   in reply to nomadic_cupcake

    you need public var arguments:Class; after public class loader extends MovieClip {

     

    also, noticed another errors...

     

    addChild(new arguments); should be addChild(new arguments());

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2010 9:27 PM   in reply to nomadic_cupcake

    This is one of the vivid examples of why one should never use anonymous functions.

     

    arguments refers to the arguments passed to function. Why do you nullify event?

     

    Here is docs for arguments:

     

    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.ht ml

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 6, 2010 5:26 AM   in reply to nomadic_cupcake

    Again, rename variable arguments because "arguments" is an AS3 keyword.

     

    Second, where does EverybodyEditsBeta reside? What package? Is it in the same directory as your FLA (or top level class)?

     

    And I urge you again to get rid of anonymous function - it is evil.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 5:16 AM   in reply to nomadic_cupcake

    How do you use loader class? I mean how do you instantiate it?

     

    Also, you cannot use variable with the same name as class - you have variable loader.

     

    Also, how do you import EverybodyEditsBeta class? It must be compiled into current swf before it can be referenced. Is it in separate swf? Why do you have to use getDefinitionByName() but not class directly?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 20, 2011 6:57 AM   in reply to nomadic_cupcake

    Hi all, i had the same problem.

    This code does'nt works:

     

    classReference = getDefinitionByName("src.MySprite") as Class;

     

     

    This works:

     

    var s:MySprite;

    classReference = getDefinitionByName("src.MySprite") as Class;

     

    Can you tell me why?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points