What Causes Flash Error #2012 in Flex Builder 3?

Asked By 10 points N/A Posted on -
qa-featured

Maybe you could just give me the most definite answer of the main reason why a flash error occurs? Admittedly, I am just new to Action Script 3 and I have been troubled with some problems. I was able to create a project with a few simple classes using Flex builder 3.

At first it seems to have no problem when class A initiates an object of class B. It is then compiled finely but the problem is an error message: “Argument Error: Error #2012: B class cannot be instantiated” would appear even before it would run. What might be the cause of this?

 

SHARE
Answered By 0 points N/A #130316

What Causes Flash Error #2012 in Flex Builder 3?

qa-featured

Normally the errors that occur in the flash are due to something that is getting null in its parameters or is not performing correctly.

  1. Using the try catch block usually works. However in your error, there is something else involved.
  2. The class that you are trying to use as the child class is the subclass of an object that can be a Display object and it belongs to an abstract class.
  3. The child class can never inherit the abstract class methods so you need to change it.
  4. You have to change the child class into something else in order to tackle the problem that you are facing. It is just due to poor use of inheritance feature

 

Related Questions