_colours = [0x000000, 0x000000];
_alphas = [0, 1];
_ratios = [0, 0xFF];
_matrix = new Matrix();
_matrix.createGradientBox(_holeRadius, _holeRadius, 0, _holeX - _holeRadius/2, _holeY - _holeRadius/2);
graphics.clear();
graphics.beginGradientFill(GradientType.RADIAL, _colours, _alphas, _ratios, _matrix);
graphics.drawRect(0,0,1920,1080);
graphics.endFill();
This is my code to generate a hole in a pure black square. The radius and the position of the hole come from an external data file. The hole has an alpha gradient and is used to create some sort of illumination, however I can’t seem to get it working on HTML5 targets even though they run perfectly on native targets.
Has anyone had this kind of problem?