0 Replies Latest reply on Nov 6, 2006 3:14 AM by Newsgroup_User

    Smooth gradient

    Level 7
      So at this stage I have a swf 1024x768 in which I use following code. If I make
      swf smaller everything is ok but when it is in full screen I can see that
      gradient is not smooth. Is there a way to make it smooth? May be I am doing
      something wrong?

      import flash.geom.Matrix;
      DX = 0;
      DY = 0;
      minPad = 50;
      width = 1024;
      height = 768;
      _root.createEmptyMovieClip("Ramka", 0);
      var Ramka:MovieClip = _root.Ramka;
      Ramka._x = DX;
      Ramka._y = DY;
      Ramka.clear();
      Ramka.lineStyle(0, 0, 0);
      matrix = new Matrix();
      col1=0x01014B;
      col2=0x5F5FFE;
      matrix.createGradientBox(width, height,Math.PI/4, 0, 0);
      Ramka.beginGradientFill("linear", [col1, col2], [100, 100], [0, 255], matrix);
      Ramka.moveTo(minPad, 0);
      Ramka.lineTo(width, 0);
      Ramka.lineTo(width, height-minPad);
      Ramka.curveTo(width, height, width-minPad, height);
      Ramka.lineTo(0, height);
      Ramka.lineTo(0, minPad);
      Ramka.curveTo(0, 0, minPad, 0);
      Ramka.endFill();