Hi,
I am hoping someone may know anything about using gwt-fabridge.jar. I am
trying to use gwt-fabridge to invoke an ActionScript method when a gwt
button is clicked.
In my ActionScript (MyTest.as), I have:
public function record():void {
ns.publish("abc","record");
}
public function resume():void {
ns.resume();
}
public function pause():void {
ns.pause();
}
public function stop():void {
ns.close();
}
In GWT, I have:
SWFParams params = new SWFParams("MyTest1.swf", new Integer(400),
new Integer(400));
params.addVar("bridgeName", "audio");
swfWidget = new SWFABridgeWidget(params);
add(swfWidget);
swfWidget.show();
// add initialization listener
swfWidget.addInitializationListener(AudioRecorder.this);
recordButton.addListener(new ButtonListenerAdapter() {
public void onClick(Button button, EventObject e) {
BridgeParameter params = new BridgeParameter();
BridgeObject flexApp = swfWidget.root();
flexApp.invokeMethod("record",params.getParameter());
}
});
I have also tried to replace the invokeMethod line with:
BridgeParameter params = new BridgeParameter();
params.addParameter("testfile");
params.addParameter("record");
flexApp.getObject("ns").invokeMethod("publish",params.getParameter());
That way, I can invoke on the NetStream object directly.
However, both solution does not work. The record method is still not
invoked.
Does anyone know what is wrong with my code?
Thanks alot for all your help in adavance.
Regards,
Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---