0 Replies Latest reply on Sep 21, 2007 7:36 PM by Force_Code

    mx:BitmapFill

    Force_Code
      I've been coding in Flex SDK for about a day and a half. I'm trying to fill some large font text with a bitmap -essentially using the text as a mask on the bitmap, (except you can't use text as a mask, even though text is a DisplayObject, which is the type for Mask). The following code doesn't work either - I just get black text - not text filled with the bitmap. Does anyone know what I'm doing wrong:

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:Style>
      @font-face {
      src:local("FairfaxStation");
      fontFamily: fairfax;
      }
      </mx:Style>

      <mx:BitmapFill source="@Embed('259.png')" id = "bmf259" />

      <mx:Text x="0" y="0" width="100%" fontSize="72" fontGridFitType="subpixel"
      fontFamily="fairfax" preinitialize="bmf259.begin(graphics,new Rectangle(0,0,400,400))"
      initialize= "bmf259.end(graphics)" >
      <mx:text>
      Here's some text to fill.
      </mx:text>
      </mx:Text>

      </mx:Application>