Flash menu on an HTML page

Hi everyone, I need to figure out how to do this. Here is a working sample on a page that I found


the idea is that I’ll be using the same flash menu for all my HTML pages but my flash menu will know that my page has change and I was inside of a submenu so when the new page loads it goes directly to that submenu. I have an idea about how to do this but I wanted to know the best and most efficient way of doing this.

I’m thinking on sending a variable to JavaScript and then send the variable back to flash and go directly to that frame. So any help or advice is welcome.