PDA

View Full Version : LoadVars load aspx var value


Shahzeb
11-07-2006, 11:09 AM
Hi all

I need help regarding LoadVars... I just want to get asp.net var string value in flash...

here its my action script code..

loadDomainValue.fla
-------------------------------------------------------------------------------------
var tt:LoadVars = new LoadVars();
tt.load("StartService.aspx",this);

tt.onLoad = function()
{
_root.createTextField("MyTextField",1,0,0,200,200);
_root.MyTextField.multiline = true;
_root.MyTextField.text = this.mytext;
}
stop();
-------------------------------------------------------------------------------------



And here is my startServices.aspx codebehind.

startServices.aspx
-------------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim mytext As String
mytext = "shahzeb"

Response.Write(mytext)



End Sub
-------------------------------------------------------------------------------------



I have embeded flash file in aspx... When i view aspx page in browser it createText field but text shows undefined....

I can do this using flash remoting .net but ths is my project requirement ....... So I'll have to first get value from aspx page..
Anyone can let me out this .....





Regards
Shahzeb

Shahzeb
11-07-2006, 01:29 PM
Hi all

I need help regarding LoadVars... I just want to get asp.net var string value in flash...

here its my action script code..

loadDomainValue.fla
-------------------------------------------------------------------------------------
var tt:LoadVars = new LoadVars();
tt.load("StartService.aspx",this);

tt.onLoad = function()
{
_root.createTextField("MyTextField",1,0,0,200,200) ;
_root.MyTextField.multiline = true;
_root.MyTextField.text = this.mytext;
}
stop();
-------------------------------------------------------------------------------------



And here is my startServices.aspx codebehind.

startServices.aspx
-------------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim mytext As String
mytext = "shahzeb"

Response.Write(mytext)



End Sub
-------------------------------------------------------------------------------------



I have embeded flash file in aspx... When i view aspx page in browser it createText field but text shows undefined....

I can do this using flash remoting .net but ths is my project requirement ....... So I'll have to first get value from aspx page..
Anyone can let me out this .....





Regards
Shahzeb