I did a fast research about how to make flash interact with the container website, and i collected some good information.
There are 2 main techniques to implement communications between flash and the container website:
1- Client API technique:
a- Using the ExternalInterface which exist in the action script classes, http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html, http://kb2.adobe.com/cps/156/tn_15683.html#about,
2- Server API technique:
Using this technique, flash will call the server side APIs directly, and will post variables to the API URL, also there is another way is to send these variables using Querystrings, which will not be the right way all the time and may be not possible in some cases ‘put in mind for example the max number of query string characters’.
Most of game websites use the server side APIs, but big famous website give both options, server or client side APIs. http://www.kongregate.com/developer_center/docs/kongregate-api
Server Side advantages from my point of view:
– More secure calls.
– No problems with different browsers compatibilities.
Client Side advantages:
– Middle layer, between the server side code and the flash, which encapsulates the server side methods and don’t let the flash call the server APIs directly but will be through this JS layer.
– Gives the ability to submit values to the server using Ajax style ‘without refreshing the whole page’.