1 Reply Latest reply on Nov 11, 2009 9:32 AM by CoreyRLucier

    Scale-9 in Flex 4

    flairjax Level 1

      Two questions.


      First does scale-9 work in Flex 4 ( http://opensource.adobe.com/wiki/display/flexsdk/Scale9+in+FXG )?


      Is it possible to scale an image that is embedded via CSS?


      So for instance you can do this:


                      scaleGridTop="55", scaleGridBottom="137",
                      scaleGridLeft="57", scaleGridRight="266"

                  public var FancyBorderImage:Class;

      But in my app I embed all images via CSS like so:

      warning: Embed('assets/images/state/warning.swf');
      viewmode: Embed('assets/images/ViewMode.png');

      Then in my app I have a utility that gets the images when needed like so:
      Images.resource_single(itemString); //function call

      -- Function that is called above --
      public static function resource(name:String):Class
                     var image:Class = _css.getStyle(name) as Class;
                     //name = _aliases[name];
                     if (name){
                          image = _css.getStyle(name) as Class;
                     if (image == null){
                     //trace( name + " was not found via Image.resource call");
                          image = _css.getStyle(DEFAULT) as Class;
                     return image;
                public static function resource_single(name:String):Class
                     var sname:String = name.toLowerCase();
                     return resource(sname + 'S');

      So when I get my images via my util they of cource need to come back as Class. Can I do the scale-9 stuff in
      the CSS file? Or is there some other solution?  I really don't want to have to have pay our art guy to recreate
      images smaller? Plus I need the images in three different sizes.