AS3 - Access the methods of a dynamically created movieclip
How do I access the methods of a dynamically created movieclip/object?

**Main.as** - Only the relevant code

    var temp:MovieClip = MovieClip(getChildByName('field_' + field.id));
    trace(temp);
    trace(temp.testReturn);
    trace(temp.testVar);

**Check_box_component.as** - Only the relevant code.

    public var testVar:String = 'test';   
     
    public function testReturn()
    {
    return 'value returned';
    }

**Output:**

    [object Check_box_component]
    function Function() {}
    test

When I trace *temp.testReturn*, why does it show *function Function() {}* instead of *value returned*

This link below helped me get this to this point.

http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119/

AS3 - Access the methods of a dynamically created movieclip
===

How do I access the methods of a dynamically created movieclip/object?

**Main.as** - Only the relevant code

    var temp:MovieClip = MovieClip(getChildByName('field_' + field.id));
    trace(temp);
    trace(temp.testReturn);
    trace(temp.testVar);

**Check_box_component.as** - Only the relevant code.

    public var testVar:String = 'test';   
     
    public function testReturn()
    {
    return 'value returned';
    }

**Output:**

    [object Check_box_component]
    function Function() {}
    test

When I trace *temp.testReturn*, why does it show *function Function() {}* instead of *value returned*

This link below helped me get this to this point.

http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119/
