0 Replies Latest reply on Mar 19, 2008 9:17 AM by PL-KUKOC

    transparent window style and CPU usage


      I have noticed something strange when I was working on transparent window style in AIR.

      I created new AIR project and set window size: 1024x768, frame rate: 30 fps and window style to transparent.
      then i put in a loop random colorTransform and random text with interval 33 miliseconds (30fps).

      nothing special, but when I started this movie, the application process took 24% of my CPU (Pentium 2,8GHz).
      after that i changed window style to opaque and again run the process... CPU usage stoped at 2%.

      in my opinion it shouldn't be like that. maybe you have some solutions for that.
      thanks for every replay!.

      here i'm posting the action script:


      var square:Shape = new Shape();
      square.graphics.drawRect(100, 100, 100, 100);

      var mytext:TextField = new TextField();
      var format:TextFormat = new TextFormat();
      format.font = "Verdana";
      format.color = 0xFF0000;
      format.size = 20;
      mytext.defaultTextFormat = format;
      mytext.x = 100;
      mytext.y = 250;
      mytext.width = 400;

      // 33 miliseconds interval == 30 fps
      var stepID:uint = setInterval(ustawKolorObiektu, 33);
      function ustawKolorObiektu():void {
      square.transform.colorTransform = new ColorTransform(Math.random(), Math.random(), Math.random(), 1, 0, 0, 0, 0);
      mytext.text = Math.random();

      and here is direct link to zip file containing the FLA, SWF, AIR EXE and AIR installer with my test.