5 Replies Latest reply on May 11, 2009 11:40 AM by Gregory Lafrance

    showEffect does not work in mx:Form

    Johnking08 Level 1

      I have some code like this in a component:

       

      <mx:Canvas ...>

      <mx:WipeLeft id="wl" />

      <mx:Form ... creationCompleteEffect="wl" showEffect="wl">

           ...

      </mx:Form>

      </mx:Canvas>

       

      The WipeLeft effect only shows once at first time when the Form is displayed. When I display the Form again, there is no effect.

      The "showEffect" has no effect. Why?

        • 1. Re: showEffect does not work in mx:Form
          Gregory Lafrance Level 6

          This code works:

           

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
            <mx:WipeLeft id="wl" duration="2000"/>
            <mx:Form id="myForm" creationCompleteEffect="wl" showEffect="wl">
              <mx:FormItem>
                <mx:Label text="Hello to you from me"/>
              </mx:FormItem>
            </mx:Form>
            <mx:Button label="Hide Form" click="myForm.visible=false;"/>
            <mx:Button label="Show Form" click="myForm.visible=true;"/>
          </mx:Application>

           

          If this post answers your question or helps, please mark it as such.

          1 person found this helpful
          • 2. Re: showEffect does not work in mx:Form
            Johnking08 Level 1

            It is helpful, but I'm not using button to hind and show the Form.

             

            I use TabNavigator to display and leave the Form. The effect shows at first time. When I come back to the same tab from another tab, no effect shows.

            • 3. Re: showEffect does not work in mx:Form
              Gregory Lafrance Level 6

              This code still works for me:

               

              <?xml version="1.0" encoding="utf-8"?>
              <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                <mx:WipeLeft id="wl" duration="2000"/>
                <mx:TabNavigator>
                  <mx:Form id="myForm" creationCompleteEffect="wl" showEffect="wl">
                    <mx:FormItem>
                      <mx:Label text="Hello to you from me."/>
                    </mx:FormItem>
                  </mx:Form>
                  <mx:Form id="myForm2" creationCompleteEffect="wl" showEffect="wl">
                    <mx:FormItem>
                      <mx:Label text="Now you are here."/>
                    </mx:FormItem>
                  </mx:Form>
                </mx:TabNavigator>
              </mx:Application>

              1 person found this helpful
              • 4. Re: showEffect does not work in mx:Form
                Johnking08 Level 1

                My actual code is something like:

                 

                <?xml version="1.0" encoding="utf-8"?>
                <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                  <mx:WipeLeft id="wl" duration="2000"/>
                  <mx:WipeRight id="wr" duration="2000"/>
                  <mx:TabNavigator>
                      <mx:Canvas>
                      <mx:HBox >
                        <mx:Form id="myForm" creationCompleteEffect="wl" showEffect="wl">
                          <mx:FormItem>
                            <mx:Label text="Hello to you from me."/>
                          </mx:FormItem>
                        </mx:Form>
                        <mx:Form id="myForm1" creationCompleteEffect="wr" showEffect="wr">
                          <mx:FormItem>
                            <mx:Label text="Hello to you from me. right."/>
                          </mx:FormItem>
                        </mx:Form>
                    </mx:HBox>
                    </mx:Canvas>
                    <mx:Form id="myForm2" creationCompleteEffect="wl" showEffect="wl">
                      <mx:FormItem>
                        <mx:Label text="Now you are here."/>
                      </mx:FormItem>
                    </mx:Form>
                  </mx:TabNavigator>
                </mx:Application>

                 

                I have two more layers: canvas and hbox.

                • 5. Re: showEffect does not work in mx:Form
                  Gregory Lafrance Level 6

                  I would think the following should not be necessary, but it seems only the top level container gets the show event:

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                    <mx:WipeLeft id="wl" duration="2000"/>
                    <mx:WipeRight id="wr" duration="2000"/>
                    <mx:TabNavigator>
                        <mx:Canvas show="wl.play([myForm]);wr.play([myForm1])">
                        <mx:HBox >
                          <mx:Form id="myForm" creationCompleteEffect="wl" showEffect="wl">
                            <mx:FormItem>
                              <mx:Label text="Hello to you from me."/>
                            </mx:FormItem>
                          </mx:Form>
                          <mx:Form id="myForm1" creationCompleteEffect="wr" showEffect="wr">
                            <mx:FormItem>
                              <mx:Label text="Hello to you from me. right."/>
                            </mx:FormItem>
                          </mx:Form>
                      </mx:HBox>
                      </mx:Canvas>
                      <mx:Form id="myForm2" creationCompleteEffect="wl" showEffect="wl">
                        <mx:FormItem>
                          <mx:Label text="Now you are here."/>
                        </mx:FormItem>
                      </mx:Form>
                    </mx:TabNavigator>
                  </mx:Application>