AS3 Error 1195: Attempted access of inaccessible method cacheAsBitmap through a reference with static type flash.display:DisplayObject.

AS3 Error 1195: Attempted access of inaccessible method cacheAsBitmap through a reference with static type flash.display:DisplayObject.

Description:
Error 1195 can have any number of methods listed in this AS3 Error so I probably should have listed it as Attempted access of inaccessible method someMethod through a reference with static type variableType. This is caused because you are either calling a private method from another class, or calling a method defined in a namespace that is not in use.

Solution:
If you are calling a method defined in an unused namespace, add a use statement for the required namespace. Otherwise, check that the method is within scope and accessible.

Thanks and Happy Flashing

Curtis J. Morley

One thought on “AS3 Error 1195: Attempted access of inaccessible method cacheAsBitmap through a reference with static type flash.display:DisplayObject.

  1. Hi,
    I had this problem too , and it’s because I mistakenly used cacheAsBitmap as a method. I wrote this:

    sprite.cacheAsBitmap();

    instead of:

    sprite.cacheAsBitmap = true;

Comments are closed.