A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: beginGradientFill not working in v7 player?

Hybrid View

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Location
    Copenhagen, Denmark
    Posts
    228

    beginGradientFill not working in v7 player?

    Hi

    The code below is copied directly from the helpdocs - and when published as player version 6 it works fine - BUT when publishing as v7 it apparently does nothing... Does anyone know what is going on here?

    Code:
    _root.createEmptyMovieClip( "grad", 1 );
      with ( _root.grad )
    
      {
    
      colors = [ 0xFF0000, 0x0000FF ];
      alphas = [ 100, 100 ];
      ratios = [ 0, 0xFF ];
      matrix = { a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1 };
      beginGradientFill( "linear", colors, alphas, ratios, matrix );
      moveto(100,100);
      lineto(100,300);
      lineto(300,300);
      lineto(300,100);
      lineto(100,100);
      endFill();
    
      }
    cheers
    idi

  2. #2
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    AS2 is case sensitive, as opposed to AS1, so you probably have to change your linetos and movetos to lineTo() and moveTo()

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Location
    Copenhagen, Denmark
    Posts
    228
    Hi

    Apparently you're absolutely right - it does work fine when I do that. Old and bad habits die hard I guess :-)

    cheers
    idi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center