I’m doing an geometry object tranformations for a project. I need to have same rectangle across 4 parts in a screen. So when i change one rectangle others will be transformed like scaling or something.
So i was able to do this with image, just giving “source” attribute. How to do with geometry objects?
<s:Group id="rectangle" left="10" top="10">
<s:Rect height="100" width="100">
<s:stroke>
<s:SolidColorStroke color="0x000000" weight="1"/>
</s:stroke>
<s:fill>
<s:RadialGradient>
<s:GradientEntry color="0x11111" ratio="0" alpha=".5"/>
</s:RadialGradient>
</s:fill>
</s:Rect>
</s:Group>
<mx:Image scaleContent="true" left="400" top="5"
source="{rect}" autoLoad="true"/>
Here i’m having a problem referencing above rectangle.
<mx:Image scaleContent="true" left="400" top="5"
source="{rect}" autoLoad="true"/>
Give the rectangle an ID:
Then you should be able to access it via ActionScript. The Rect has properties scaleX, scaleY, and scaleZ; but I’m not sure if that is what you want. You could also just change the height and width to make something bigger / smaller.