1 Reply Latest reply on Nov 21, 2010 1:14 AM by drkstr_1

    how to pass a parameter: string to a function, and this, run the window in the parameter received?

    giba_f Level 1

      For exemplo:

       

      I have several calls into a single function, passing the window that is open to:

      private function RunTitleWindow1():void {
          CallTitleWindow("TitleWindow1");
      }

      private function RunTitleWindow2():void {
          CallTitleWindow("TitleWindow2");
      }

      private function RunTitleWindow3():void {
          CallTitleWindow("TitleWindow3");
      }

      private function CallTitleWindow(_Window:String):void {
          var window:_Window = new _Window();
      }

       

      Thanks

       

      Gilberto