MX: Tie effects to a dynamic textfield?

Be greeted.

I am working on a flash file that dynamically displays data coming from (currently two) XML files on screen. I’m filling various text fields and adjusting colours based on startup parameters, etc. All that already works.

It’s a live commentary display thing for any sort of sports game (currently focussing on soccer, though) and I have 1 big textfield for the live commentary (coming from one XML file) and various other smaller fields for the score, team names, scorer, etc. (coming from another XML file).

Now I have a question:
The content of, for example, the team statistics field is filled by functions that interpret the XML and come up with a list of the players and (if applicable) the goals they shot and the penalties (red and yellow card) they received.
Currently, for myself, I only put out the plain text- and the info for a player looks like this:

“02 Fahrenhorst [IN:27] [51] [22:Y]”
the “02” is the shirt number, then the name, then when they were substituted (“IN” or “OUT” if appicable), when they shot a goal and when they received penalties (Y for Yellow, R for Red), all accompanied by the play time / minute.

I made a fancy little rotating soccerball, red and yellow cards and rotating green arrows that move on mouse-over (my boss wants it to be an “overkill” of bells and whistles)…

So here is the question, finally: is there a way to relatively easily apply / position those symbols after the player name?
I guess it’s not possible to include MCs in an html formatted textbox (or is it?)- so it would have to be on an own layer… for that I guess I can retrieve the row that the players are in- but the exact length (width) of the name of the player might be a problem because I have to use a “_sans”-type font (and that makes it hard to know just how wide the player name really is / where to begin placing the symbols)…

I guess this is all a bit theoretical- what happens is this:
I have a function that loads the XML and distributes the data from it to various arrays (currently 7). Then, in the code, it checks which team is currently displayed and runs through a loop that fills the string for the textfield:

>> loop team (player ID)
_>> has been substituted? (if so, get & display replaced player ID instead)
_>> add to string: “shirt number”, “name”
__>> if player was substituted, add “when”.
____ (replaced player goes to a seperate array and field)
___>> if the player shot goals(s), add “when”
____>> if the player received penalties, add “when” and “type”
>> add a “<br>”.
<< (next player)

All that stuff goes to a single string that is then sent to the text field.

So yea- any ideas on an easy way to position the symbols rather than the temporary text bits that I am using now? I am going to try and figure out a way myself but input is welcome :slight_smile:

Thanks for your time and support!
~Marcel