Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and Flash 2

Status
Not open for further replies.

FreshJava

Programmer
Feb 20, 2002
65
US
I hope some one can help me with this.
I am trying to teach myself how to use asp and flash together. I am using the book server side flash. On the very first exercise, I ran into problems.
As far as I can tell I followed the books instructions to the letter, But either the book left something out or I am missing something.
OK on to the problem. The page that I am using to test is this is hwere my movie is located and
this is where my asp script is located. Where the movie is located
I have a button with the following action script attached.
on (release) {
loadVariablesNum(" 0);
}
I am using a dynamic textbox with variable name set to fromASP
on the data.asp page I have the following vbscript
<%
Dim fromASP
fromASP = &quot;Greetings from ASP&quot;
Response.Write fromASP
%>
I am expecting that when the button is pressed that I should get the following message.
&quot;Greetings from ASP&quot;
What am I doing wrong.
 
it might be nothing more than the use of loadvariablesnum. i cant see anything amiss with the rest.
try using loadvariables instead(leave off num).
 
It also might be the fact that you're trying to use the loaded information before it's actually been returned from the server - try building in a delay of a few seconds before you call the data to check this or build in an onClipEvent(data) function.

If you're using MX the loadVars() command will take care of these type of problems for you.
 
Thanks for your suggestions wangbar and billwatson, but unfortuntly, I was unable to get either solution to work. Wangbar I do have MX so I tried loadVars() to no avail. When it comes to actionscript and ASP I am a complete novice. I finally sat down and said that I was going to learn both. I am a fair Java programmer, so I thought that I should be able to pick this up,with out any great problems. I have moved where I was testing at so if you tried to look there, I apologize. The new test location is

and
IF someone has the time could you look at my .fla here is the location for the download


Thanks
 
Thanks Bill that worked like a charm, but so did my original code. Turns out that problem lay within the VB script. I put the script inside html tags and saved it as an asp file. As soon as I took the html tags out viola it worked. I tried this with the code that you suggested and out ot curiosity tried it with my original code. Both worked great. I'm giving both you and wangbar stars for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top