2 Replies Latest reply on May 28, 2010 10:10 AM by sleblang

    Error #2005: Parameter 0 - incorrect type. Should be type Filter.

    sleblang Level 1

      I am attempting to use some effects when a titlewindow is shown (added) via PopUpManager. I have the following code: At runtime, I receive the following error when attempting to show the titleWindow. If I remove the titleWindow.filters, the error is no longer thrown.

       

      ArgumentError: Error #2005: Parameter 0 is of the incorrect type. Should be type Filter.

      at flash.display::DisplayObject/set filters()

       

                public function init():void {
                     
                     wipe = new Wipe()
                     wipe.direction = WipeDirection.DOWN;
                     wipe.startDelay = 100;
                     wipe.duration = 750;
                     
                     fade = new Fade()
                     fade.alphaFrom = 0;
                     fade.alphaTo = 1;
                     fade.duration = 750;
                     
                     filters_arr = new Array();
                     filters_arr.push( fade )
                     filters_arr.push( wipe )
                     
                }
      
                public function openWindow(pWindow:UIComponent):void {
                     
                     titleWindow = new ProjectsTitleWindow();
                     titleWindow.width = 400;
                     titleWindow.height = 400;
                     titleWindow.filters = filters_arr;
                     
                     PopUpManager.addPopUp(titleWindow,pWindow)
                     PopUpManager.centerPopUp( titleWindow );
      
                }