3 Replies Latest reply on Feb 25, 2009 4:18 PM by Newsgroup_User

    scale9Grid

    marcink Level 1
      hi,

      how can i the scale9Grid to a Canvas property?
      like this (not working):

      thanks for the help!
        • 1. Re: scale9Grid
          Level 7

          "marcink" <webforumsuser@macromedia.com> wrote in message
          news:go3rqm$9ng$1@forums.macromedia.com...
          > hi,
          >
          > how can i the scale9Grid to a Canvas property?
          > like this (not working):
          >
          > thanks for the help!
          >
          > <?xml version="1.0" encoding="utf-8"?>
          > <mx:Application
          > xmlns:mx=" http://www.adobe.com/2006/mxml"
          > layout="absolute">
          > <mx:Script>
          > <![CDATA[
          > import flash.geom.Rectangle;
          >
          > private function init() : void
          > {
          > this.canvas.scale9Grid = new Rectangle(10, 10, 50, 50);
          > }
          > ]]>
          > </mx:Script>
          > <mx:Canvas id="canvas" width="200" height="200"
          > creationComplete="this.init();"/>
          >
          > </mx:Application>

          That doesn't make any sense whatsoever. You need to apply the scale9 grid
          to the image class you're using as the background for the canvas.


          • 2. Re: scale9Grid
            marcink Level 1
            hi,
            maybe i was trying to simplify too much. here's what i have - again simplified:


            the border symbol has the property scale9grid set
            now i want (as simulated in the application file) to scale the Video component. but the background image should scale with the scale9grid.

            is that possible without overriding the scaleX setter of the Video.mxml?
            or do i have to make a custom scaleX setter that scales the background image separatly?

            thanks
            • 3. Re: scale9Grid
              Level 7

              "marcink" <webforumsuser@macromedia.com> wrote in message
              news:go4ha3$5qu$1@forums.macromedia.com...
              > hi,
              > maybe i was trying to simplify too much. here's what i have - again
              > simplified:
              >
              >
              > the border symbol has the property scale9grid set
              > now i want (as simulated in the application file) to scale the Video
              > component. but the background image should scale with the scale9grid.
              >
              > is that possible without overriding the scaleX setter of the Video.mxml?
              > or do i have to make a custom scaleX setter that scales the background
              > image
              > separatly?

              You're not actually setting scale9 properties on the image in the Embed
              statement. Try setting up your help like this:
              http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html

              Maybe that will help you to locate the info you need in the docs.