[MX2004] How to call dynamic input text from class

Hello all,

I have a problem with my actionscript, and i hope some of you can give me a push in the right direction.

In the GameBox class, I make several instances of the Movieclip/Class “Module”. These Module movieclips have a dynamic input text named “moduleNaam”.

The way how i make instances of Module:

class GameBox extends MovieClip
{
 ...
    
    function GameBox() {
        ....
        
        // Place the modules
        attachMovie("Module", 'Module1, 2001, {id: 1, naam: "icom4"});
        attachMovie("Module", 'Module2', 2002, {id: 2, naam: "ibk2"});
        attachMovie("Module", 'Module3', 2003, {id: 3, naam: "icom4"});
        attachMovie("Module", 'Module4', 2004, {id: 4, naam: "ibk2"});
....

Is this the right way to do such things?

Then, in the Module.as class

class Module extends MovieClip {
    ...
    var id : Number; 
    var naam : String; 
    
    function Module() {
        ....
        _root.gameBoxInst.Module1.moduleNaam.text = naam;
    }

But to call the moduleNaam via _root is not very convenient, and how can I target this very module, ipv only Module1? Like: this or “Module”+id or something?