How to call javascript and php methods from flash

Hello Friends,

How to call a javascript method from flash ?? am having a simple javascript code ie

<script type=“text/javascript”>
function helloWorld() {
alert(‘Hello World’);

Now how to call the method helloWorld() from flash ??

Similarly how to call a php method also ?? am having the php code as,


function writeName()
echo “PHP”;

echo "My name is ";

</html> **

now i want to call writeName() from flash ?? how to achieve these things from flash ?

Wats the code i have to write in flash cs3 ??