Dear All,
Java: 1.4.02
App server: Tomcat 4.1.27
Authoring tool: Flash MX 2004 Pro trial version + latest flash Remoting component
Remoting: Latest J2EE remoting downloaded
OS:Windows XP with lastest patches installed
I am able to install and run the java flash remoting with samples on
web url:http://localhost:8080/flashgateway/
gateway url:
http://localhost:8080/flashgateway/gatewaybut when I tried to make my helloworld program(see the code below), it fails. There is nothing appearing on the netconnection debugger and also no error message has been displayed.
Then I turned to modify the zip 2 temperature sample and run it in flash mx 2004 pro, again nothing happened. I tried to publish it and put it on the app server then run it on IE, also nothing happened.
The java class was put in correct location.
Anyone got the same problem? I'm really frustrated and don't know what's going on.
Any help is appreciated!
in fla: (result is a textarea component)
#include "NetServices.as"
#include "NetDebug.as"
#include "DataGlue.as"
var myURL = "
http://localhost:8080/flashgateway/gateway";
var myServicePath = "online.HelloWorld";
function init()
{
if (this.inited != undefined)
{return;}
else
{
this.inited = true;
trace("111");
NetServices.setDefaultGatewayUrl(myURL);
WebSvr = NetServices.createGatewayConnection();
myService = WebSvr.getService(myServicePath, this);
}
}
function onStatus( error )
{
_root.result.text = error.description;
}
function SayHello()
{
myService.sayHello();
}
function sayHello_Result(result){
_root.result.text = "Data received from Server : " + result;
}
init();
SayHello();
stop();
in Java:
package online;
public class HelloWorld
{
public String sayHello()
{
return "Hello World from Java";
}
}