Accessing "root" in AS 3
I realize that "_root" no longer exists in AS 3, yet how do I access objects on the timeline from within a class?
I have "myMovieClip" on the main timeline. It has an associated class "MyMovieClip.as"
I have another class that I want to pass variable values from to be placed in text fields nested inside the "myMovieClip" on the timeline: "myMovieClip.title.text"
I've tried passing values thru a static function method, yet this is even limited because I cannot seem to pass the value outside of that function into the general scope of the class.
This works if I just place it in a general function inside MyMovieClip class:
private function init() {
title.text = "TEST";
}
yet something more dynamic like calling this static function from an outside class gets an error message:
public static function updateCallTag(d:String) {
title.text = d;
}
1120: Access of undefined property title.
Seem like this should be pretty simple and straight forward. What am I missing here?
