3 Replies Latest reply on Feb 20, 2010 6:56 AM by David_F57

    Will the bound dimension values update when the application changes size?

    nikos101 Level 2

      If I do this will the values update when the application changes size?

       

          <s:Rotate3D
                              angleYFrom="0" angleYTo="-90"
                              angleXFrom="0" angleXTo="90"
                              repeatBehavior="{RepeatBehavior.REVERSE}"   
                              transformY="{-12345678/this.height}"
                              transformX="{-12345678/this.width}"
                              repeatCount="2" duration="1200"
                              effectEnd="effectEndHandler(event)">

        • 1. Re: Will the bound dimension values update when the application changes size?
          David_F57 Level 5

          Hi,

           

          The example code is not 'bound' in the traditional sense as the rotate will only happen when you call it, so the height/width used when you call the rotate function will always be whatever the current value is.

           

          David.

          1 person found this helpful
          • 2. Re: Will the bound dimension values update when the application changes size?
            nikos101 Level 2

            Cool thanks

             

            I've been trying to get a component to dissappear off the top right hand

            side of the screen no matter what the application dimensions are. But its

            harder than I think, hear is what I've tried

             

                <s:Rotate3D

                                    angleYFrom="0" angleYTo="{-0.08*this.height}"

                                    angleXFrom="0" angleXTo="{0.08*this.width}"

                                    repeatBehavior="{RepeatBehavior.REVERSE}"

                                    transformY="{-20000}"

                                    transformX="{-20000}"

                                    repeatCount="2" duration="1200"

                                    effectEnd="effectEndHandler(event)">

                            <s:effectRepeat>

                                <![CDATA[

                                customEditor.editor.textFlow = new TextFlow();

                                ]]>

                            </s:effectRepeat>

                        </s:Rotate3D>

             

            Any ideas what I need to change

             

            best wishes

             

            Nikos

            • 3. Re: Will the bound dimension values update when the application changes size?
              David_F57 Level 5

              Hi,

               

              I would approach things a little differently, the following app will show/hide a panel, now you could obviously do this with transitions etc but the principle stays the same use negative dimensions on the side you want to transition on (top/left/bottom/right). You could also do this for say a panel inside another panel in that case you would disable scroll policy and myou may need to set the clip rect.

               

              <?xml version="1.0" encoding="utf-8"?>

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

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

                 xmlns:mx="library://ns.adobe.com/flex/mx" top="0" left="0" bottom="0" right="0">

               

              <fx:Script>

              <![CDATA[

              protected function button1_clickHandler(event:MouseEvent):void

              {

              if (pnl.right==0) pnl.right=(-pnl.width) else pnl.right=0;

              }

              ]]>

              </fx:Script>

               

              <fx:Declarations>

              <!-- Place non-visual elements (e.g., services, value objects) here -->

              </fx:Declarations>

              <s:Panel id="pnl" width="250" height="200" right="0" top="0">

              </s:Panel>

              <s:Button label="Button" horizontalCenter="0" verticalCenter="0" click="button1_clickHandler(event)"/>

              </s:Application>