Search code examples
actionscript-3flash-cs6

AS3 Load library movie based on parameter on Parent


I have following scenario:

I have created a movie symbol at library called mov_Child. Which has dynamic text field. But I have to pass parent movies text value to the mov_Child's dynamic text field.

How can I do that?


Solution

  • Give instance name to dynamic textfield e.g. "myTextField"

    var parentMoviesText:String = "This is parent movies text";
    
    mov_Child.myTextField.text = parentMoviesText; // Here you pass the text value