all groups > flash data integration > january 2006 >
You're in the

flash data integration

group:

LoadVars - asp.net variable to .swf Help?



LoadVars - asp.net variable to .swf Help? Captain Bluebelle
1/31/2006 10:01:19 PM
flash data integration: :confused; This should be the simplest thing to do: have a .swf say, "Welcome,
NAME."

I've spent 8 hours on tutorials and I just really need help. Yep, this is my
first try at this particular thing. Thanks for looking, I hope someone can
help.

The .swf is in the same directory as an asp.net file that is calling the name,
but I want the name to be inside the flash.

My current result is that, instead of a name, I get "Welcome, UNDEFINED."

I have a dynamic text box with an instance name of "welcome_txt".

This is the code on the asp page named "MainContent.aspx.vb":

[quoted text, click to view]
System.EventArgs) Handles Me.Load

Dim sb As New StringBuilder
Dim sFName, sLName As String
sFName = Request.QueryString("FN")
sLName = Request.QueryString("LN")
sb.Append("")
sb.Append(sFName)
sb.Append(" ")
sb.Append(sLName)
sb.Append("")
Me.lblHdr.Text = sb.ToString<<


I will now attach the code I have in the first frame of my ActionScripting.

Thanks a trillion to anyone out there that can/has the heart to help me.

/* Create instance of LoadVars */
var myData = new LoadVars();

// After loading is complete, trace the LoadVars object.
myData.onLoad = function(success) {
trace(myData.sFName);
welcome_txt.text = myData.sFName;

};

/* Load Data into the LoadVars object. */
myData.load("MainContent.aspx.vb");

//Output data to welcome_txt
welcome_txt.text = myData.sFName;
Re: LoadVars - asp.net variable to .swf Help? gurthWERM
2/1/2006 2:29:05 PM
Try using the syntax:
myData

I think I had a similar prob and this fixed it.

Re: LoadVars - asp.net variable to .swf Help? Captain Bluebelle
2/1/2006 10:57:09 PM
Re: LoadVars - asp.net variable to .swf Help? gurthWERM
2/22/2006 2:32:08 PM
Re: LoadVars - asp.net variable to .swf Help? Phantom Trader
2/22/2006 6:27:45 PM
You need to "trace(myData.sFName);" after you assign it to "welcome_txt.text".
See if that helps any.

myData.onLoad = function(success) {
welcome_txt.text = myData.sFName;
trace(myData.sFName);
}
AddThis Social Bookmark Button