Skip to main content
May 6, 2014
Question

Adobe Flash CC: The definition of base class Bitmap not found in custom class

  • May 6, 2014
  • 1 reply
  • 387 views

Hello!

I am developing a new game and wanted to subclass the Bitmap class. I am working on Adobe Flash CC.

I have the following code:

package  com.classes{

import flash.display.Bitmap;

  public class AdBitmap extends Bitmap {

       public function AdBitmap() {

            // constructor code

       }

  }

}

However, when I run, I get the following error: The definition of base class Bitmap was not found.

Any ideas?

Cheers!

This topic has been closed for replies.

1 reply

May 7, 2014

Can you include you source files? I just created a brand new FLA and .as file with your code and replicated your package structure and had no issues. I just opened the Actions Panel and put code on the timeline to create the AdBitmap object. Added a trace statement to the AdBitmap class to make sure it was working. Granted, I did it all in CS6 as that is what I have, but code that simple shouldn't be any different between CS6 and CC.