OpenFL legacy Matrix and TextField issues

Hello!

After I compiled my android app using -Dlegacy, some things got really messy.

  1. Matrix is not working, here is the code that should rotates a rectangle around its center, but for no reason it’s not working, although in OpenFL 3 it worked perfectly:

     playerLine.rotation += deltaTime * 10 / 1000;
    
     var center: Point = new Point(playerLine.width / 2, playerLine.height / 2);
     var matrix: Matrix = new Matrix();
     matrix.rotate(Math.PI * playerLine.rotation / 180);
    
     var resultedPoint = matrix.transformPoint(center);
    
     playerLine.x = Lib.current.stage.stageWidth / 2 - resultedPoint.x;
     playerLine.y = Lib.current.stage.stageHeight / 2 - resultedPoint.y;
    
  2. TextFormat doesn’t work either, except the color property. Here is the code I use for my textfields but all the textfields are left centered, with the default font and the default size:

     var format: TextFormat = new TextFormat();
     format.font = "fonts/Dense-Regular.ttf";
     format.size = Lib.current.stage.stageHeight / 5;
     format.color = 0xffc107;
     format.align = TextFormatAlign.CENTER;
    
     titleText = new TextField();
     titleText.text = "AROUND";
     titleText.defaultTextFormat = format;
     titleText.width = Lib.current.stage.stageWidth;
     titleText.height = titleText.textHeight;
     titleText.x = 0;
     titleText.y = Lib.current.stage.stageHeight * 1 / 4 - titleText.height / 2;
    
     addChild(titleText);
    

Please help me!

What’s going wrong with using OpenFL without -Dlegacy?

I can’t use the admob extension and the SharedObject does not work.