Grabbing URL of current page to use in as 2.0

I am building a flash component to be embedded on an html side - the flash will include buttons to ‘share’ - i.e. on facebook, twitter, etc. I want to be able to grab the URL of the page and put it into the coding on the button.

Currently the button says:

tweetbtn.onRelease = function() {
getURL(“http://twitter.com/home?status=Check Out This Company at www.thiscompany.com”, “_blank”);
};

I’d like the user to be able to share the current page, not just the home page.

Can someone help with the code to grab the URL and the code to place on the button? I’ve found snippets elsewhere but can’t put it together to work.
Thanks!

PS. bonus - any chance it is possible to grab the title of the page as well? This is much less important.