Displaying variable in a text box?

Hi,

I have a tiny spaceship and I can control its direction and speed using the arrow keys. Its only a test for the moment so it looks pretty basic.

Anyway, now that I have that working I am trying to put in a dynamic text box which will display the speed of the spaceship as it slows down or speeds up. I’ve put the text box in a movieclip called “caption” on the same timeline as the space ship but I can’t get a reading.

The variable that holds the speed is called “speed” and the textbox in which i want to display the speed is called “carspeed”. I thought this might do it:

[color=blue]_root.caption.carspeed = speed;[/color]
[color=#0000ff][/color]
[color=black]However I just keep getting “undefined” in the text box.[/color]
[color=black][/color]
[color=black]I’ve attatched the .fla so you can have a look.[/color]
[color=black][/color]
[color=black]Press the up arrow to go fwd and the down arrow to slow down and move backwards.[/color]
[color=black][/color]
[color=black]Any help would be greatly appreciated![/color]

Thanks!