# How to call javascript and php methods from flash

**URL:** <https://forum.kirupa.com/t/how-to-call-javascript-and-php-methods-from-flash/295556>\
**Category:** flash\
**Created:** [September 1, 2009, 9:22am UTC](https://forum.kirupa.com/t/how-to-call-javascript-and-php-methods-from-flash/295556 "2009-09-01T09:22:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajesh\_flash](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rajesh\_flash](https://forum.kirupa.com/u/rajesh_flash)\
**Post date:** [September 1, 2009, 9:22am UTC](https://forum.kirupa.com/t/how-to-call-javascript-and-php-methods-from-flash/295556/1 "2009-09-01T09:22:51Z")

</div>

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’);  
}  
\</script\>**

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

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

**\<html\>  
\<body\>**  
**\<?php  
function writeName()  
{  
echo “PHP”;  
}**  
**echo "My name is ";  
writeName();  
?\>**  
\*\*\</body\>  
\</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 ??

Rajesh
