9 Replies Latest reply on Apr 28, 2009 11:00 AM by Brent Lamborn

    9 slicing an embedded image with Flex

    Brent Lamborn Level 2

      I'm trying to 9 slice an image using the technique described here:




      Here is my mxml:



      <?xml version="1.0"?>
       xmlns:mx="http://www.adobe.com/2006/mxml" > 
                     /* Title box */               [
      Embed("assets/images/titlebox.png", scaleGridTop="2", scaleGridBottom="20", scaleGridLeft="30", scaleGridRight="90")]               [
      Bindable]public var titleBox:Class;           ]]>
                <mx:Image source="{titleBox}" width="500" />



           I'd like the small white box in the image to remain, while the right portion scales to fit a label I will place over the image. Right now with the above code, the image appears the same, no matter what I put in the width parameter.


      Can anyone help? Attached is TitleBox.png