So I have the following code:
using openfl.display.BitmapData;
using openfl.display.Graphics;
...
public function drawVerticalLine(x:Float, starty:Float, endy:Float, color:Int){
Graphics.lineStyle(1, color);
Graphics.moveTo(x, starty);
Graphics.lineTo(x, endy);
}
It doesn’t compile. I get the following errors:
Class<openfl.display.Graphics> has no field lineStyle
Class<openfl.display.Graphics> has no field moveTo
Class<openfl.display.Graphics> has no field lineTo
This is strange. These methods exist in the docs. They exist in the openfl code. Why can’t I access them?