8 Replies Latest reply on Jan 22, 2009 8:11 PM by shintashi

    begingradientfill question

    shintashi Level 1
      How do I get the gradient fill to go from top to bottom instead of sideways?

      -------------------

      var FF2text:MovieClip = createEmptyMovieClip ("FF2text", getNextHighestDepth());
      onEnterFrame = function(){
      import flash.filters.GlowFilter;
      var glowInstance:GlowFilter = new GlowFilter(0xFFFFFF, 0.6, 5, 5);
      FF2text.filters = [glowInstance];

      import flash.geom.Matrix;
      var gradbox:Matrix = new Matrix();
      gradbox.createGradientBox(200, 100);


      FF2text.lineStyle (3,0xFFFFFF,95,true,none,none,square,0)
      //FF2text.beginFill (0x2425DB);
      FF2text.beginGradientFill("linear", [0x2425DB, 0x000000], [100, 100], [0x00, 0xFF], gradbox);

      FF2text.moveTo (105, 100);
      FF2text.lineTo (395, 100);
      FF2text.curveTo(400, 100, 400, 105);
      FF2text.lineTo (400, 195);
      FF2text.curveTo(400, 200, 395, 200);
      FF2text.lineTo (105, 200);
      FF2text.curveTo(100, 200, 100, 195);
      FF2text.lineTo (100, 105);
      FF2text.curveTo(100, 100, 105, 100);
      FF2text.endFill ();

      }

      --------------------