|
Using phpBender for the first time |
|
|
|
This tutorial explains the first use of phpBender component to develop Flash applications.
After completing installation process of phpBender, you will see that phpBender listed in your Components Window. Drag phpBender component to the stage on the main timeline.

To enable using phpBender methods, give it an instance name e.g. myComp

and add the following codes to Frame 1 on the main Timeline:

- If you bought Commercial License of phpBender, you may use regid property to make phpBender recognize your serial/registration ID. By doing this, a notification and link back to our website will be removed e.g.
myComp.regid = “xxxxxxxxxxxxx”;
- The next phpBender’s property that you have to describe is remoteURL which will inform phpBender Flash component the location of phpBender PHP file on your web server e.g
myComp.remoteURL = “http://localhost/freebender.php”;
In this case, you have to type the absolute URL of your phpBender PHP file instead of its absolute path e.g. “/home/accountname/public_html/myApplication/freebender.php”.
- Test your phpBender component by using phpBender methods such as php, phpArg, exec and db; e.g.
myCodes = "$myName=\"Jonas\";"+
"$myAge=\"26\";"+
"echo \"&myResults=Hello! my name is $myName and I'm $myAge years old.\";";
myComp.php(myCodes, myFunction);
function myFunction(){
trace(myComp.result); // output panel
myText.text = myComp.result.myResults;
}
Final step, select Control > Test Movie to test the component in Flash Player.
* When testing your movie in Flash Player, you will see some information in Output Panel about status of your Remote URL and total bytes loaded.

|