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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash variables from ASP

Status
Not open for further replies.

snoopy75

Technical User
Aug 24, 2001
340
US
I have a simple Flash movie where I'm loading some variables from an ASP page. In the simple case, this should work, right?:
Code:
<% response.write(&quot;testvalue=345&success=1&quot;) %>
However, it seems like Flash is actually reading the VB code in the ASP page instead of evaluating it. So when I test my movie, and list variables, I get:
Code:
Variable _level0.<esponse.Write(&quot;testvalue = &quot;345&quot;
Variable _level0.success = &quot;1\&quot;&quot;
The only way it actually works is if my ASP file looks exactly like this:
Code:
testvalue=345&success=1
No tags, no quotes, nothing. Which kind of messes me up when I want to start retrieving these values from a database. Why would it behave like this? Is there something I've overlooked about this whole process? Forgive me if this is a simple answer, I'm very new to Flash. Thanks in advance for any tips.

--Ryan
 
Alright, I answered my own question. Apparently, the whole problem came about because I was trying to use Flash MX while following along with a tutorial made for Flash 5. Yes, the differences are drastic! Here's what I learned:

- Dynamic/Input text box instance names and the variable names they represent are NOT the same. You need to explicitly assign the .text value from the text box to the variable before using LoadVariables. And on Dynamic Text boxes, there's another little field called &quot;var&quot; that you need to fill in to tell it what variable to put there.

- For some reason, in my LoadVariables statement, &quot;GET&quot; worked where &quot;POST&quot; wouldn't. I don't know why.

- When you repeatedly test your Flash movie on a web server, you need to re-publish it before each refresh, or you're just going to get really frustrated wondering why it's not changing. ;-)

Thanks anyway. Sorry none of you guys had any tips for me. Maybe next time.

--Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top