Flash and AJAX


I’m confused by some references to flash and Ajax working together. Am I correct in thinking that:

1- flash sends a request to the Javascript functions on an HTML page.

2- which in turn sends a request to some server side script which requests data from a database.

3- which then sends out an xml file that flash reads?

If not, can someone help and explain?