Skip to content

Security sandbox violation: BitmapData.drawWithQuality cannot access null. No policy files granted access. #4184

@hahmann1979

Description

@hahmann1979

Problem Description

Getting SecurityError: Error #2123: Security sandbox violation: BitmapData.drawWithQuality: app:/Orana%202.2.3.4_document_default.swf cannot access null. No policy files granted access.
	at flash.display::BitmapData/drawWithQuality()
	at Orana2_2_3_4_document_default_fla::MainTimeline/indicator_click()[Orana2_2_3_4_document_default_fla.MainTimeline::frame1:8079]
  • Which AIR SDK did you use? using SDK 51.2.1.7
  • Using windows 11
  • it will work the first couple of times when clicking to create a bitmap of a movieclip on stage, but at somw point it will give the error on drawWithQuality

Steps to Reproduce

theMovieClip = new MovieClip();
theMovieClip = position_holder;
var bitmap:Bitmap;
var bounds : Rectangle
var m:Matrix;
bounds = new Rectangle();
bounds = theMovieClip.getBounds(theMovieClip);	
bitmap = new Bitmap(new BitmapData(theMovieClip.width * MovieClip(root).widthScale,theMovieClip.height * MovieClip(root).heightScaleOffset, true, 0x0));
m = new Matrix(1, 0, 0, 1, -bounds.x, -bounds.y);
m.scale( MovieClip(root).widthScale,  MovieClip(root).heightScaleOffset)
bitmap.smoothing =true;

// error on this line
bitmap.bitmapData.drawWithQuality(theMovieClip, m, null, null,  null,  false,StageQuality.BEST);

	
bitmap.width = bitmap.width / MovieClip(root).widthScale;	
bitmap.height = bitmap.height / MovieClip(root).heightScaleOffset;			
imageX = new Bitmap();
imageX = bitmap;
imageX.smoothing =true;
imageX.y = position_holder.y - 30 ;
imageX.x = position_holder.x ;
imageX.alpha = 0.4;
addChild(imageX)

Known Workarounds

none....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions