0 Replies Latest reply on Dec 20, 2013 8:55 AM by afukada

    how to center a VGroup when scaled


      I'm using the following code to center a VGroup, and it works when the scaling factor is 1.



      <?xml version="1.0" encoding="utf-8"?>
          <s:Group width="100%" height="100%">
              <s:VGroup width="300" height="200" horizontalCenter="0" verticalCenter="0">
                  <s:Rect width="100%" height="100%">
                          <s:SolidColor color="gray" />


      However, when the scaling factor is set to 1.5, for example, the output is messed up. The VGroup is no longer centered. It's actually gone off the screen. I think what happened is that the outer Group was blown up by 1.5 (of which we can only see a portion) and the VGroup is centered in that blown-up space. How can I get the VGroup to be 1.5 times larger and centered on the screen?