Using Flash to address things "outside" of flash movies

Hello,
I didnt really know what this was called so I gave it my best effort, but really this is what I am trying to do:

I want to have a Flash navigation bar that is embedded within some HTML and ASP code (don’t worry about that code, the flash is all I am new at). Then when the buttons in the flash movie are pushed, I want to be able to address a frame or an iframe, and open content. Essentially, it is exactly like a a regular menu bar (at least that is what I am imagining) but I dont know how to pass through variables (like an asp query string) or if I can call a javascript function onClick.

Any help would be greatly appreciated. Thanks