I'm trying to access a text input that I've already placed on the stage (inside a movie clip) but with no luck.
I've defined an instance name for this dynamic text field which is currentUserCount
I've got something like this set up in the document class actionscript file:
package {
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.display.Stage;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class myProject extends Sprite {
public function myProject() {
// Trying stuff like
trace(currentUserCount);
trace(movieClipName.currentUserCount);
trace(root.currentUserCount);
}
}
}
What am I missing?
When I run this I get:
1120: Access of undefined property currentUserCount.
1120: Access of undefined property movieClipName.
1119: Access of possibly undefined property movieClipName through a reference with static type flash.display:DisplayObject.
1120: Access of undefined property currentUserCount.