Dynamic Text Issue

Hey all hope you can help me with this one… very strange.

I created a dynamic text from the tool bar and placed it on top of a rectangle that is a movieclip that points to class Information. I am giving you heads up because I did not create the dynamic text through var dytext:TextField…etc.

I named the instance p_name. and in the constructor I did:

p_name.text = “Empty”; this was sorta a warning that something isn’t

Then inside the document class named DocumentClass I created an instance of the parent class of p_name called Information. basically I did.

var info:Information = new Information(); I did this to allow me to call a
function inside the information class.

The Player class is where I draw the string to be placed into the dynamic text field.

info.UpdateInfo(player.player_name); Update Info is simply passing in a
string and changing p_name inside the Information class.

I also changed the player.player_name to something different.

player.player_name = “New Name”; When I trace this it works fine :slight_smile:

UpdateInfo function looks like this.

public function UpdateInfo(s:String)
p_name.text = s;


When I trace p_name it shows the correct string information, but it doesn’t update the text when I run the movie.

Am I doing something wrong? It seems strange because I would have thought it would update the dynamic text once it was changed but apparently not. I have noticed that the Information class does get created before my Document class. Im guessing this is because the objects are physically placed into the scene as opposed of being created dynamically.

I would greatly appreciate any help. I can give more code if needed but I didn’t want to spam the post.