sifr gradient

Discussion in 'JavaScript' started by artsofthemonth, Aug 9, 2009.

  1. #1
    Hello,

    I would like to use sifr for a heading of mine and want to have a horizontal gradient on it. From top color: f8f7eb till the bottom color: d2d1c2 . I think I need to do this with a ColorMatrixFilter but I have no idea on how to start with this.

    this is how it should look like:
    
     filters: {
            ColorMatrixFilter  ....		
          }
    });
    Code (markup):
     
    artsofthemonth, Aug 9, 2009 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    there is no cross-browser compliant css method for creating a gradient. you can use canvas / js though...

    i saw this on ajaxian last week: http://ajaxian.com/archives/css-gradients-for-all but i doubt you can use that on a font.

    as for sifr - is this still going? i'd check their faqs / api / docs.
     
    Last edited: Aug 11, 2009
    dimitar christoff, Aug 11, 2009 IP
  3. artsofthemonth

    artsofthemonth Peon

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the link. This is the page for filters in sifr:
    http://wiki.novemberborn.net/sifr3/Filters

    they sugest to visit the livedoc site of adobe but I find it hard to find anything over there.

    Anyone else who tried using sifr with a gradient? The other method doesn't work with different fonts I reckon
     
    artsofthemonth, Aug 12, 2009 IP
  4. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #4
    looks like you may be able to use the php interface and check the output from something like this:

    var colors:Array = [0x000000,0xFFFFFF];
    // Sets the transparency of each color.
    var alphas:Array = [1, 1];
    // Set the position of each color.
    var ratios:Array = [0,180];
    // Creates a variable with info about the Filter settings.
    var myGradientBevelFilter = new GradientBevelFilter (1, 90, colors, alphas, ratios, 16, 16, 20, 3, "inner", false);
    // Applies the filter to the object named myObject. 
    
    PHP:
    http://board.flashkit.com/board/showthread.php?t=795410
     
    dimitar christoff, Aug 13, 2009 IP
  5. artsofthemonth

    artsofthemonth Peon

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have asked about some more info in that topic thanks for posting. As I don't see this working with php.
     
    artsofthemonth, Aug 13, 2009 IP