No can do really,
The PHP file connects to a database and Flash cannot do that on it's
own. It will need some serverside script to connect.
Even if you only want to connect to the database through PHP, you still
need some serverside PHP to initiate these classes and to function as a
handle for Flash to access these classes.
Or did I misinterpret?
Manno
[quoted text, click to view] DANGH_b wrote:
> hello!
> i have 2 classes in php:
> the first one is "comm.php":
> <?php
> require ('Inter.php');
> //----------------------------------------------------
> class comm
> { var $testt;
> var $con;
>
>
> var $v=array();
>
>
>
> function test(){
> //echo " d ".$this->v[1]->nume ." d ";
> $this->testt=$this->testt." asaasa ";
> echo $this->testt;
>
> }
>
>
> function init()
> {
> $this->con = mysql_connect("localhost","root","");
> if (!$this->con) die('Could not connect: ' . mysql_error());
>
> mysql_select_db("auto_babc", $this->con);
> $this->v= array(new Inter());
>
> }
>
>
> function insert($s)
> {
> $this->vv=new Inter();
>
> $result = mysql_query("SELECT * FROM data");
> $row = mysql_fetch_array($result);
> //echo $name;
> while($row['Feature_str_name']!=$s)
> {
> $row = mysql_fetch_array($result);
>
> }
>
> $this->vv->xx=$row["x"];
> $this->vv->yy=$row["y"];
> $this->vv->nume=$row["Feature_str_name"];
> // echo " ".$this->v[$i]->name." ";
> $this->vv->localname=$row["Feature_str_local_name"];
> $this->vv->lat=$row["Feature_dec_lat"];
> $this->vv->lon=$row["Feature_dec_lon"];
> $this->vv->v1=$row["Feature_int_id"];
> $this->vv->v2=$row["Feature_int_variant_of_feature_int_id"];
> $this->vv->v3=$row["Admin1_str_code"];
> $this->vv->v4=$row["Country_str_code"];
> $this->vv->v5=$row["Feature_int_font_code"];
> $this->test = "abc";
> array_push($this->v, $this->vv);
>
>
> }
>
> function close()
> {
> mysql_close($this->con);
> }
>
>
> }
>
>
>
>
> ?>
>
> and the second one is inter.php(the php requiered in the first one)
> <?php
> //echo "dasda:".$_POST["numar"] ."dsadA";
>
> class Inter
> {
> var $xx=1;
> var $yy;
> var $nume;
> var $lat;
> var $lon;
> var $v1;
> var $v2;
> var $v3;
> var $v4;
> var $v5;
> var $localname;
>
> function in(){
> $this->yy="please man"}
> }
> ?>
>
> How can i make the class from the comm.php available in flash?
> I want to work with the functions in it directly from flash.
> Please help.
> Thanks in advance
>
>
>
>
>
--
----------
Manno Bult