Importing a string variable to flash movie

Supposed situation:
Embed flash movie & a Real Player Plugin in a webpage.
Trying to completely control the Real Player Plugin using the Flash Movie for user interaction and let Javascript send all the requests to the RealPlayer Plugin(such as play, pause, stop, rewind, forward).

I know how to send a variable out of the Flash Movie by using the FSCommand to the JavaScript in the webpage. This allows me to control the RealPlayer plugin by play, pause, stop, and even which song to play.

Now the tricky thing is in the Flash Movie, how do I request and send information from the RealPlayer plugin to the Flash Movie in the webpage using Javascript? Such as the the Length of the song, the position in time of play, and other Statistics so I can display them all in the Flash movie.

Basically how can I Send Data from the Webpage Into the FLASH MOVIE?

Any suggestions.

there is a pretty simple method of talking TO flash from the html page…i had wanted to have a flash do different things for different users…only i didnt want to have the user “login” on every html page that used flash…

since i had the username passed into each page already (i used asp to set the value for username…dont see why setting a value with javascript should be any different)

I just sent the user name into flash the same way you would using a query string on a url …?variable=value

In my case i set a dynamic text box in the flash named “username”

so to send the user name to flash from the html page…there are 2 places to put the variable… in both the object and embed tags that point to the source swf…

the object…

<param name=“yourmovie”

and embed tags…

<embed src=“movie.swf?username=<%=username%>”>

thats it…you could send multiple values this way…flash is happy so long as its one long string (no spaces) with the values seperated by &'s