Passing variable from javascript to flash help pls

Hello, I have been looking for a way to do this for a while now but havent really found an easy way of doing this. I want to pass a URL from javascript to my swf file so I can tell it to play a video when a button is clicked on the html page. Can some one show me an example of how to do this because I have to add this to the code flash spits out when you publish it. Any help would be awsome.