2 Replies Latest reply on May 27, 2008 2:39 AM by Shelady

    Using text as a mask

    Neobii
      Alright, I just got into flex not to long ago from coding in flash for a while. I have a client that wants me to make a mask out of text, this is easy to do in flash, just throw it into a movieclip and you're done. Well flex uses UIMovieClips and every time I try it, it gives me errors at runtime.

      Here's my code, please let me know where I'm going wrong.

        • 1. Re: Using text as a mask
          Neobii Level 1
          Here's the solution...
          <mx:Image source="goldfoil_white.jpg" id="goldFoil" mask = "{masker}" x = "500" y = "500" width = "400" height = "300" cacheAsBitmap="true"/>
          <mx:Text cacheAsBitmap="true" x="500" y="500" text="Hello" id ="masker"/>

          Make sure both are cashed as bitmap... and I guess I won't be trying to use flash components in flex again haha.
          • 2. Re: Using text as a mask
            Shelady
            would you please write the final full code, I was unable to run this code in Flex3.
            Thanks