java - How can I access flash variable by using JSP -
java - How can I access flash variable by using JSP -
have created simple login form in adobe flash cs6 2 fields, username , password. want send these info jsp page rest processes such authentication. next image visualize problem
the actions script utilize this
stop(); btnlogin.addeventlistener(mouseevent.click, submitted); function submitted(event:mouseevent):void { try{ trace("mouse clicked in button"); trace(txtusername.text); trace(txtpassword.text); var myrequest:urlrequest = new urlrequest("http://localhost:9093/java&flash/index.jsp"); myrequest.method = urlrequestmethod.post; var variables:urlvariables = new urlvariables(); variables.username = txtusername.text; variables.password = txtpassword.text; myrequest.data = variables; var loader:urlloader = new urlloader(); loader.dataformat = urlloaderdataformat.variables; loader.addeventlistener(event.complete, dataonload); loader.load(myrequest); }catch(e:error){ r.text=e.message; } } function dataonload(evt:event):void { //this reverse mode. mean if want //fetch jsp variable should handle here }
and jsp file
<%@ page contenttype="text/html;charset=utf-8" language="java" %> <html> <head> <title>using , post method read form data</title> </head> <body> <center> <object width="100" height="100" type="application/x-shockwave-flash" data="http://localhost:9093/java&flash/logindb.swf" id="applicationid" > <param name="movie" value="http://localhost:9093/java&flash/logindb.swf"> <embed src="http://localhost:9093/java&flash/logindb.swf" width="100" height="100"> <h1>using method read form data</h1> <ul> <li><p><b>first name:</b> <%= request.getparameter("username")%> </p></li> <li><p><b>last name:</b> <%= request.getparameter("password")%> </p></li> </ul> </embed> </object> </center> </body> </html>
the question jsp not value. should solve problem
java actionscript-3 jsp flash
Comments
Post a Comment