Get current url from a php page with an swf

I have a hybred PHP/MySQL site with a Navbar on each page.

The navbar is built dynamically based on a prefs file.

I want to have the swf navbar read which current page it is on and highlight the button.

In php, I would get the page by doing a $curpage = $PHP_SELF
then pulling the substring to get the current page name.

How do I do this in Flash? When I try to load vars, I get all the html from the page, and no variables.

I would think that getURL(this) might be close, but I think that won’t be quite right for some reason.

Should I try an input type=hidden and use a form post or get?

I’m not sure how to extract variables from a page with other content on it.