Networking, Programming and Graphics Tutorials

Integrate Flash in PHP [1/2]

Type: Code Networking, Programming and Graphics Tutorials
Integrate Flash in PHP
Level: Intermediate Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials 
Integrate Flash in PHP
Date: 2008-Jun-22
Integrate Flash in PHP
Visited: 732 times
Integrate Flash in PHP
Rating: Integrate Flash in PHP
Integrate Flash in PHP
Author: Alex Plumpton

This is a lesson that will show you how to transform variables from Flash clip to PHP script Means to Learn.

Settings of the Flash player
Make an Input Box with the Text tool. You have to give a name for the impute box in the text properties pannel. You can choose the name by yourself but you have to remember it because you will use it in the PHP script.

I made 3 Input boxes. I named them "name","age",and "eye". I guess they are easy enough to be remembered?
Ok now you will need a button to open the PHP page. To open a new page in Flash use the action script and especially the variables getURL().This is the code:

submit.onPress = function () {
      
getURL ("getVars.php""_blank""POST");
}
Interpret the code:Means to Learn.

1. getVars.php is the name of the PHP file witch you are going to use;
2. _blank makes the butting which is opening the page;
3. POST is the method in which to transfer the variables. The other option is GET.

The PHP code:

<?
// Receiving the variables.
$name $_POST['name'];
$age $_POST['age'];
$eye $_POST['eye'];

// Printing out the variables.
print "Your name is "$name ".";
print 
"You are "$age ." years old.";
print 
"You have "$eye ." eyes.";
?>
Networking, Programming and Graphics Tutorials - Integrate Flash in PHP [1/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: integrate php in flash  integrate php and flash  integrate flash with php  integrate flash file in php  integrate flash player  how to integrate flash player+php  how to integrate flash player in php  how to integrate flash on php pages  how to integrate flash in websites  how to integrate flash files in php