sql server table data in Flash dynamic textbox using Asp.net
i have dynamic text-fields in flash (AS 3) and button on my form. my backend is sql server and i want show data in text-fields on but开发者_C百科ton click event. i m using asp.net as server side script.
I have Form in Flash and i want to fetch data in form on flash button click event from sql server .
Thanx
It will help you..
var urlRequest:URLRequest = new URLRequest("your aspx page url");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
btn_submit.addEventListener(MouseEvent.CLICK, btn_submit_click);
function btn_submit_click(e:Event)
{
urlLoader.load(urlRequest);
}
function urlLoader_complete(e:Event)
{
txt_box.text = e.target.data.aspx_var;
}
you need to just print varible in your aspx page. like in PHP i am writing this(bcause i don't know aspx).
<?
echo "aspx_var=value";
?>
精彩评论