The way I'm thinking is if there is a sort of tag that get's the current URL like location in Javascript or there's an even more advanced method in PHP, use that to test in an if statement for each button every time it loads.
But I'm not sure if Flash MX 2004 Pro has it (I only have MX and I know it doesn't have that).