0 Replies Latest reply on Aug 25, 2007 3:55 PM by DEfusion

    Passing arguments to a custom component in the constructor

    DEfusion Level 1
      I would like to know if it is possible to pass arguments to a custom component in the constructor when I'm instantiating it within Actionscript. I've not seen anyone do this, so at the moment I have a couple of public properties defined on the custom component and then do the following:

      var myComponent:TestComponent = new TestComponent();
      myComponent.propertyOne = true;
      myComponent.propertyTwo = 12;

      etc.

      Whereas I'd like to do something like:

      var myComponent:TestComponent = new TestComponent( true, 12 );

      Any ideas if this is possible?