0 Replies Latest reply on Nov 19, 2009 1:04 AM by Stuart McD

    Problems combining effects

    Stuart McD

      Hi. I've found two problems that I can't find the solution for. If I have a Sequence containing a Parallel I get a NULL reference when I try to use it (I can give the Parellel part an ID and use that, but then obviously the action following it won't occur) i.e.

       

      Second problem is if I have a sequence with a Zoom text then a Dissolve the text resizes back to full size before the dissolve occurs. How do I make dissolve the text at the zoomed size?

       

      Here's some code showing the two problems

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
          xmlns:comp="components.*"
          layout="absolute"
          width = "300"
          height = "150"
          >
             
      <!-- This causes a NULL exception -->
          <mx:Sequence id ="dissolveOut1">
              <mx:Parallel>
                  <mx:Zoom duration="1000" zoomHeightTo="0.5" zoomWidthTo="0.5" />
                  <mx:Dissolve duration="1000" alphaFrom="1.0" alphaTo="0.0" />   
              </mx:Parallel>
              <mx:RemoveChildAction />
          </mx:Sequence>   

      <!-- The text it not zoomed when the dissolve starts. Also REMOVE2 displayed twice -->
          <mx:Sequence id ="dissolveOut2">
              <mx:Zoom duration="1000" zoomHeightTo="0.5" zoomWidthTo="0.5" />
              <mx:Dissolve duration="1000" alphaFrom="1.0" alphaTo="0.0" />   
              <mx:RemoveChildAction />
          </mx:Sequence>   

          <mx:HBox fontSize="30">
              <mx:VBox>
                  <mx:Button label="PRESS" click="{txt1.setVisible(false)}" />
                  <mx:Button label="PRESS" click="{txt2.setVisible(false)}" />
              </mx:VBox>
              <mx:VBox>
                  <mx:Text id="txt1" text="TEST1" hideEffect="{dissolveOut1}" removed="trace('REMOVED1')" />
                  <mx:Text id="txt2" text="TEST2" hideEffect="{dissolveOut2}" removed="trace('REMOVED2')" />
              </mx:VBox>
          </mx:HBox>
         
      </mx:Application>

      As a final question (purely for my understanding of what's going on). Notice in the above that dissolveOut2 does a RemoveChildAction. Well "REMOVED2" is trace'd twice. Why is that?

       

         Thanks,


      Stuart.