3 Replies Latest reply on Oct 13, 2007 10:23 PM by kglad

    scripted blur......then unblur

      I have one button that tweens a movieclip to another position and I've added a scripted blur to it. I want to have a close button that tweens the movieclip back to its original position and then unblurs the scripted blur I applied with the first button.

      I have:

      //This function is called on button 1
      function blurPanelIn():Void {
      var myBlur = new flash.filters.BlurFilter(10,10,3);
      var myTempFilters:Array = panel.filters;
      myTempFilters.push(myBlur);
      panel.filters = myTempFilters;
      }
      //I want this function to unblur what the first function did when this is called from the close button.
      function blurPanelOut():Void {
      var myBlur = new flash.filters.BlurFilter(0,0);
      var myTempFilters:Array = panel.filters;
      myTempFilters.push(myBlur);
      panel.filters = myTempFilters;
      }

      I'm not too familiar with scripted filters, so I don't exactly know how to undo the first scripted filter I applied. Thanks for your help!