Hallo, i need a little help. I am creating new component in flash builder and i don't know how to give arguments to its constructor. If a create a new component named "myComponent", i would like to pass some arguments, something like:
var myComponent1:myComponent = new myComponent(myAgrument);
I usually do it with as3 classes but i don't know how to do it with flex components.
Thx for help
MXML components don't take constructor arguments. Build a AS class extends from
the same base class as your component and put in there the constructor argument.
Thx for your answer. You mean that, if i create myComponent that extends a Group class, i should then create an as class that extends the Group Class??
yes something like
public class MyClasss extends Group
private var var1:MyCustomType;
public function MyClass(arg:MyCustomType)
var1 = arg;