0

Hope someone can help. I have a Flex (4.5/Air) app that has a graphic declared like this :

<s:Graphic id="viewRect" width="200" height="200">
   <s:Rect id="border" width="200" height="200"> 
    <s:stroke >
        <s:SolidColorStroke  weight="1"  color="#606060" />
    </s:stroke>
   </s:Rect>

   <s:Ellipse id="upperLeftHandle" height="8" width="8" left="-2" top="-2" >
   <s:fill>
     <s:SolidColor color="#FFFFFF"/>
       </s:fill>
    </s:Ellipse> 
</s:Graphic>

When I resize the Graphic programatically, it also scales the border (Rect) as well as the Ellipse (upperLeftHandle). I need to resize the graphic object, but have the Rect and Ellipse (and anything else inside the Graphic) remain the same scale.

Anyone have any ideas?

zero323
  • 283,404
  • 79
  • 858
  • 880
JohnD
  • 11
  • 1

2 Answers2

0

you have to use Eclipse like this

<s:Ellipse id="upperLeftHandle" height="8" width="8" x="-2" y="-2" >

hope it would solve your problem

Santosh Anand
  • 1,028
  • 7
  • 13
  • That makes absolutely no sense whatsoever. Pasting my same tag, same parameters, is not an answer. If you don't understand the question - don't waste my time with your posts. – JohnD Jun 07 '11 at 18:12
0

Is there a specific reason you need to use the graphics tag? Using the Group tag will allow you the positioning and re-sizing capabilities that you need. As long are you are only changing the width and height of the group you will be fine and not have the scaling issues.

<s:Group id="viewRect" width="200" height="200">
    <s:Rect id="border" left="0" right="0" top="0" bottom="0"> 
        <s:stroke >
            <s:SolidColorStroke weight="1" color="#606060" />
        </s:stroke>
    </s:Rect>

    <s:Ellipse id="upperLeftHandle" height="8" width="8" left="-2" top="-2" >
        <s:fill>
            <s:SolidColor color="#FFFFFF"/>
        </s:fill>
    </s:Ellipse> 
</s:Group>
Keith
  • 36
  • 1
  • 4