From: DANGH_b on
Hello.
I am trying acces a php class and i get a few errors. I have been trying for
days to fix it but no luck yet.
I tried with a little small example at it didn`t work either. For example i
have a php named cards.php :
<?

class cards {
var $mes="please";
function getcard($getcard) {
$this->mes=$getcard;

//return $mes;

}
}


The code i flash is
#include "PHPObject.as "

tmp = new PHPObject();
tmp.setDefaultGatewayKey("secret"); // CHANGE THIS TO WHATEVER SECRET KEY YOU
SET IN Gateway.php
tmp.setDefaultGatewayUrl(" http://localhost/again/Gateway.php"); // CHANGE
THIS TO WHERE YOU PLACE Gateway.php
delete tmp;

myFoo = new PHPObject("cards"); // declare a new object and link it to a
remote PHP class

trace(myFoo.mes);

stop();


when i tried to publish it with action script 2 it gave me an error:

**Error** C:\Documents and Settings\BBluEE\Local Settings\Application
Data\Macromedia\Flash 8\en\Configuration\Include\PHPSerializer.as: Line 136:
The property being referenced does not have the static attribute.
if (v[a].__proto__ != Function.prototype)

Total ActionScript Errors: 1 Reported Errors: 1


i tried to publish it with action script 1 and it didn`t gave me that error
but in the flash output i got :
[type Function]
Error - Standalone Player
:
so every time i tried to acces a variable from the class i got [type function].

The files are all in the same folder(the config.php the gateway.php, the fla
and the cards.php file)
Please. I`m desperate.
Thank you very much in advance.