Groups | Blog | Home
all groups > macromedia flash flash remoting > may 2007 >

macromedia flash flash remoting : connecting flash and JSP


piuschungath
5/2/2007 12:00:00 AM
I am new to the action script, i have a form which read a e-mail address and
pass to a jsp page,from there it will store to a db and check ,if if it exits
in the db, if so it pass aflag value back to flash.
i Used sendAndLoad(), but the problem is, it is not working in IE, but well in
firefox...
Now i thought to change the code , and implement flash remoting



board_mc.btn_submit.onRelease = function() {
reset_button();
this.enabled = true;
this.gotoAndStop(_down);
my_lv = new LoadVars();
recv_var = new LoadVars();
my_lv.email = board_mc.email_txt.text;

my_lv.sendAndLoad("http://localhost:8084/projectETA//dbconnection_flash.jsp",rec
v_var,"POST");
recv_var.onLoad = function(successful) {
if (successful) {
if (this.flag != 0) {
gotoAndPlay(122);
}
else
{
board_mc.email_txt.textColor = 0xbc2226;
board_mc.email_txt.text = Email already exists;
}
}



How can i convert this code.......................................
Please help................................
sunny.tambi
5/3/2007 2:35:04 PM
This code should run. Just change some lines:

board_mc.btn_submit.onRelease = function() {
reset_button();
this.enabled = true;
this.gotoAndStop(_down);
my_lv = new LoadVars();
recv_var = new LoadVars();
my_lv.email = board_mc.email_txt.text;

// change is here ->
recv_var.onLoad = function(successful) {
if (successful) {
if (this.flag != 0) {
gotoAndPlay(122);
}
else
{
board_mc.email_txt.textColor = 0xbc2226;
board_mc.email_txt.text = Email already exists;
}
}


my_lv.sendAndLoad("http://localhost:8084/projectETA/dbconnection_flash.jsp",recv
_var,"POST");

Note: You are using // after projectETA in the sendAndLoad. Change it as given
above.
AddThis Social Bookmark Button