02.20.12

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

Posted in Flash at 9:10 pm by Curtis J. Morley

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

1 Comment »

  1. Nimrod said,

    March 28, 2012 at 3:00 am

    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;

Leave a Comment