Question
How to Call a function from FMS to AS3
Hi,
I am using Windows operating system, Flash CS3 and FMS 3.5. I am new to Action Script 3.0 But I am good in Action Script 2.0.
I am trying to call a function declared in Action Script 3.0 from FMS. here I have declared it as follows.
In FMS I am calling a function as
application.onConnect(client){
client.call("informServer");
};
In Flash AS 3 I have declared this function as follows.
var nc = new NetConnection();
// Now here I declare function
nc.addEventListener("informServer", informServerHandler);
nc.connect("rtmp://localhost/abc");
private function informServerHandler(evt){
trace(" Till here Done ");
}
So When I execute Flash file then it connects to FMS and also in NetStatus event of NetConnection I got Connected.
But Then I got Error in Flash as
Error #2095: flash.net.NetConnection was unable to invoke callback informServer." error=ReferenceError: Error #1069: Property informServer not found on flash.net.NetConnection and there is no default value.]
Please tell me Have I not declared the Function in AS 3 properly or I am doing something wrong. Please Some one help me...
Thanks in advance.
I am using Windows operating system, Flash CS3 and FMS 3.5. I am new to Action Script 3.0 But I am good in Action Script 2.0.
I am trying to call a function declared in Action Script 3.0 from FMS. here I have declared it as follows.
In FMS I am calling a function as
application.onConnect(client){
client.call("informServer");
};
In Flash AS 3 I have declared this function as follows.
var nc = new NetConnection();
// Now here I declare function
nc.addEventListener("informServer", informServerHandler);
nc.connect("rtmp://localhost/abc");
private function informServerHandler(evt){
trace(" Till here Done ");
}
So When I execute Flash file then it connects to FMS and also in NetStatus event of NetConnection I got Connected.
But Then I got Error in Flash as
Error #2095: flash.net.NetConnection was unable to invoke callback informServer." error=ReferenceError: Error #1069: Property informServer not found on flash.net.NetConnection and there is no default value.]
Please tell me Have I not declared the Function in AS 3 properly or I am doing something wrong. Please Some one help me...
Thanks in advance.
