2 Replies Latest reply on Dec 11, 2010 4:12 PM by Shongrunden

    Registration Point

    AonSao
      Is it possible to dynamically change the registration point of a drawn object?
        • 1. Re: Registration Point
          barpos Level 1

          Not that I'm aware of.

          • 2. Re: Registration Point
            Shongrunden Adobe Employee

            Might you be looking for the transformX/transformY/transformZ properties?

             

            For example:

             

            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                              xmlns:s="library://ns.adobe.com/flex/spark">

             

                 <s:controlBarContent>

                      <s:HSlider id="rotationSlider" minimum="0" maximum="360" />

                 </s:controlBarContent>

                 

                 

                 <s:Rect id="rect1" rotation="{rotationSlider.value}" transformX="0" transformY="0" width="100" height="100" x="100" y="100">

                      <s:fill>

                           <s:SolidColor color="red" />

                      </s:fill>

                 </s:Rect>

                 

                 

                 <s:Rect id="rect2" rotation="{rotationSlider.value}" transformX="50" transformY="50" width="100" height="100" x="250" y="100">

                      <s:fill>

                           <s:SolidColor color="red" />

                      </s:fill>

                 </s:Rect>

                 

            </s:Application>