home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 164
/
MOBICLIC164.ISO
/
pc
/
DATA
/
HOTE
/
libs
/
amfphp
/
amfphp.swf
/
scripts
/
__Packages
/
AmfPhp.as
Wrap
Text File
|
2014-05-13
|
2KB
|
45 lines
class AmfPhp extends MovieClip
{
function AmfPhp()
{
super();
trace("AmfPhp " + this);
_global._amfphp_ = this;
}
static function main(p)
{
p.mc.__proto__ = AmfPhp.prototype;
p.mc.p = p;
AmfPhp.apply(p.mc);
}
function Init()
{
this._DefaultUrl = "http://localhost/flashservices/gateway.php";
}
function Call(p)
{
trace("Call : " + this.Call);
var _loc2_ = {};
_loc2_.p = p;
var _loc3_ = p.url != undefined ? p.url : this._DefaultUrl;
trace("gatewayUrl : " + _loc3_);
mx.remoting.debug.NetDebug.initialize();
var _loc4_ = new mx.remoting.Service(_loc3_,null,p.service,null,null);
var _loc5_ = _loc4_[p.fonction](p.params);
_loc2_.handleResult = function(re)
{
trace("The result is: " + re.__get__result() + " " + this.p + " " + this.p.mc + " " + this.p.retour);
this.p.mc[this.p.retour]({resultat:re.__get__result()});
};
_loc2_.handleError = function(fe)
{
trace("There was a problem: " + fe.__get__fault().__get__faultstring());
trace("The faultcode is: " + fe.__get__fault().__get__faultcode());
trace("The detail: " + fe.__get__fault().__get__detail());
trace("The error class name is: " + fe.__get__fault().__get__type());
this.p.mc[this.p.retour]({erreur:fe.__get__fault()});
};
_loc5_.__set__responder(new mx.rpc.RelayResponder(_loc2_,"handleResult","handleError"));
}
}