6 Replies Latest reply on Jul 19, 2011 3:40 AM by HimanshuPareek66

    From Flex 3 to Flex 4

    suludi81 Level 1

      Please i need help.I already posted this but i only get two replies and today i spent all day thinking,but i just can't get it done.You have my thread called NavigatorContent problem,but i think this way will be much easier.

       

      Something that is easy to do in Flex 3 has become a real nightmare for me in Flex 4.I will provide a link with the exact example that is bothering me,it is an example of adding effects to ViewStack views done in Flex3.Please if someone could convert that code to Flex 4 using s:wipe instead mx:WipeRight and

      mx:WipeLeft.

      Here is the link:
      http://www.flex-blog.com/flex-effects-example-in-a-viewstack/

       

      Big thanks in advance,

       

      Mirko

        • 1. Re: From Flex 3 to Flex 4
          jfb00 Level 3

          Here is the solution:

          <?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" minWidth="955" minHeight="600">
              <fx:Declarations>
                  <!-- Place non-visual elements (e.g., services, value objects) here -->
                  <mx:WipeLeft duration="500" id="wipeLeft"/>
                  <mx:WipeRight duration="500" id="wipeRight"/>   
              </fx:Declarations>
                 
              <s:VGroup>
                  <mx:LinkBar dataProvider="viewStack"/>
                  <mx:ViewStack height="200" width="300" id="viewStack">
                      <mx:VBox showEffect="{wipeRight}" hideEffect="{wipeLeft}" backgroundAlpha="1" backgroundColor="#FF0000" label="Screen One">
                      </mx:VBox>
                      <mx:VBox showEffect="{wipeRight}" hideEffect="{wipeLeft}" backgroundColor="#00FF00" label="Screen Two">
                      </mx:VBox>
                      <mx:VBox showEffect="{wipeRight}" hideEffect="{wipeLeft}" backgroundColor="#0000FF" label="Screen Three">
                      </mx:VBox>
                  </mx:ViewStack>
              </s:VGroup>
          </s:Application>

           

          Johnny

          Please rate answers

          • 2. Re: From Flex 3 to Flex 4
            suludi81 Level 1

            Thank you for your reply,but the problem is that views inside a ViewStack must be wrapped inside NavigatorContent container in Flex 4.Using NavigatorContent

            doesn't work with mx:Wipe,instead s:wipe must be used,and s:wipe is not that straightforward as the old mx:Wipe,and that's where the problems begin.

            You can check my other thread-"NavigatorContent problem",with a few answers from Evtim Georgiev,and if you think of some solution please post it.

             

            Mirko

            • 3. Re: From Flex 3 to Flex 4
              jfb00 Level 3

              Base on my example please update your code to see the issue.

               

              Johnny

              Please rate answers.

              • 4. Re: From Flex 3 to Flex 4
                Shongrunden Adobe Employee

                Flex 4 doesn't officially support effect triggers like showEffect/hideEffect/etc.  If you would like to see this functionality fully supported in spark please vote for this bug: http://bugs.adobe.com/jira/browse/SDK-19743

                1 person found this helpful
                • 5. Re: From Flex 3 to Flex 4
                  suludi81 Level 1

                  Ok, i didn't know that.Will vote for this let's call it bug!

                  edit:

                  I was able to vote,but on the page the status of this bug was "closed",also my vote was only the second vote,so please if you could explain me if this issue is resolved,or is closed with no chance of Adobe changing this.

                  • 6. Re: From Flex 3 to Flex 4
                    HimanshuPareek66

                    @jfb00, Why did you use WipeLeft and wipeRight of MX Component, as
                    <mx:WipeLeft duration="500" id="wipeLeft"/>
                    <mx:WipeRight duration="500" id="wipeRight"/>

                     

                    Could you not use <s:Wipe> and declare <direction> property in this ?