Constructors with Attached Movie Clip tied to class

I have a movieclip, and it has export link “bob” and it links to the unit.as class file.

Inside unit.as


class unit extends MovieClip
{
        function unit(param1)
        {
               if (param1 == 1)
                     var mode = 1;
               else
                     var mode = 2;
        }
}

Now when I attach the MC, I want to call the constructor, and pass params… Is there anyway to do this? I always worked around it, but now I’m really curious if there is a way. :bandit: