0 Replies Latest reply on May 25, 2009 4:36 AM by mpferd

    avoid showing of a canvas in TabNavigator while playing effect?



      I´m using the great distorsion effect of Alex Uhlmann (part of Tour de Flex) in a TabNavigator with Canvas containers. The effect works fine but while fireing the IndexChangedEvent by pressing a tabsheet for a blink of an eye the target-canvas gets visible before the effect should make it visible which is very annoying.

      As you can see in the Code-Snippet

      The function  playrotate() which is called in the EventHandler only set the right parameters for the CubeRotator method, which create an effectinstance and playing the effect.






















      function ChangeListener(e:IndexChangedEvent):void


      oldI = e.oldIndex;

      newI = e.newIndex;




      private function CubeRotator(DC:String, oldI:int, newI:int):void





      var cr:CubeRotate = new

      CubeRotate( navtab.getChildAt(oldI) );

      cr.siblings = [ navtab.getChildAt(newI) ];





      ( DC == DistortionConstants.LEFT ){

      cr.direction = DistortionConstants.LEFT;





      cr.direction = DistortionConstants.RIGHT;


      cr.horizontalLightingLocation = DistortionConstants.LEFT;

      cr.duration = 1000;

      cr.distortion = 40;





      If somebody has an idea how to avoid this behaviour it would be great.


      Thanks to everybody answering