1 Reply Latest reply on Mar 18, 2007 3:16 PM by BLXWebMaster

    showEffect causing glitch on viewstack change

    ChickenSupreme
      Hi All,

      Im having a small issue when changing between viewStack states and using the showEffect, here is some sample code

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="horizontal"
      >

      <mx:ApplicationControlBar width="100%" height="30" paddingTop="0" paddingBottom="0" dock="true" borderThickness="0" verticalAlign="middle">
      <mx:ToggleButtonBar dataProvider="{stackViews}"/>
      </mx:ApplicationControlBar>

      <mx:Dissolve duration="500" id="hideE" alphaFrom="1" alphaTo="0"/>
      <mx:Dissolve duration="500" id="showE" alphaFrom="0" alphaTo="1"/>

      <mx:ViewStack id="stackViews">
      <mx:Panel title="Forum" label="Forum" hideEffect="hideE" showEffect="showE" width="300" height="300">
      <mx:Button label="button1"/>
      </mx:Panel>

      <mx:Panel title="Photos" label="Photos" hideEffect="hideE" showEffect="showE" width="300" height="300">
      <mx:Button label="button2"/>
      </mx:Panel>

      <mx:Panel title="Links" label="Links" hideEffect="hideE" showEffect="showE" width="300" height="300">
      <mx:Button label="button3"/>
      </mx:Panel>
      </mx:ViewStack>

      </mx:Application>

      its seems as though the content in the panel is shown before the showEffect starts causing a blinking effect. Anyone know how to resolve this? Thanks in advance
        • 1. Re: showEffect causing glitch on viewstack change
          BLXWebMaster Level 1
          Try removing the duplicate effects. You only need to specify a hideEffect or showEffect, not both.

          The hideEffect will show a nicer transition.

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="horizontal">

          <mx:ApplicationControlBar width="100%" height="30" paddingTop="0" paddingBottom="0" dock="true" borderThickness="0" verticalAlign="middle">
          <mx:ToggleButtonBar dataProvider="{stackViews}"/>
          </mx:ApplicationControlBar>

          <mx:Dissolve duration="500" id="hideE" alphaFrom="1" alphaTo="0"/>

          <mx:ViewStack id="stackViews">
          <mx:Panel title="Forum" label="Forum" hideEffect="hideE" width="300" height="300">
          <mx:Button label="button1"/>
          </mx:Panel>

          <mx:Panel title="Photos" label="Photos" hideEffect="hideE" width="300" height="300">
          <mx:Button label="button2"/>
          </mx:Panel>

          <mx:Panel title="Links" label="Links" hideEffect="hideE" width="300" height="300">
          <mx:Button label="button3"/>
          </mx:Panel>
          </mx:ViewStack>

          </mx:Application>