satheesh
New Member
- Messages
- 883
- Reaction score
- 0
- Points
- 0
Get a data from PHP:
1.Create a Dynamic Text and set them instance name="sta_txt".
2.Select the First Frame and Press F9.
Copy the Code below and paste it.
3.Create a PHP file in same directory and name it sample.php.
Copy the Code below and paste it.
and run it.
Demo:http://www.svprmstudio.com/PHP/
If you like this Tutorial give some Reputation.
Thanks.
By Satheesh kumar.
Edit:
Please rate this Tutorial.
1.Create a Dynamic Text and set them instance name="sta_txt".
2.Select the First Frame and Press F9.
Copy the Code below and paste it.
Code:
var req:URLRequest=new URLRequest("sample.php");
var loadder:URLLoader=new URLLoader();
//Load a Data in Variable Format.
loadder.dataFormat=URLLoaderDataFormat.VARIABLES;
//Load a Data from PHP
try {
loadder.load(req);
} catch (error:Error) {
trace("Unable to load requested document.");
}
loadder.addEventListener(Event.COMPLETE,com);
function com(event:Event):void {
var va:URLVariables=new URLVariables(loadder.data);
trace("OK");
sta_txt.text=va.message;
}
Copy the Code below and paste it.
Code:
<?php
/**
* @author
* @copyright 2008
*/
print("message=My first Flash CS3 Tutorial\nIf you like this tutorial give some Reputation\nThanks By Satheesh kumar.");
?>
Demo:http://www.svprmstudio.com/PHP/
If you like this Tutorial give some Reputation.
Thanks.
By Satheesh kumar.
Edit:
Please rate this Tutorial.
Last edited: