The action script which we created earlier all sat on the main timeline and
sent only variables which existed on the main timeline. Therefore, it stands
to reason, that the variables which the php script returns will also exist on
the main timeline.
Next, create a new labelled frame in your Flash movie call "highScores". In that frame
create two dynamic text fields on your stage and name them "players" and "scores". On
both text fields, set HTML to on, select multiline no wrap and pick a web font like
verdana and a sensible text size (12). When your Flash game receives the resulting
values of the players and scores variables sent from the php script it will automatically
put those variables into the two dynamic text fields as their names are equal. I have
included an example flash movie with these high scores text fields. It's also a good idea
to create a scroll bar for these text fields so that the viewer can scroll through the scores
when they get longer than the text fields themselves.
Nick is a Flash Developer for London based web design agency Edition Interactive. His main role is online games design and development for clients such as Channel Four Television.