Link to home
Start Free TrialLog in
Avatar of yngvi
yngvi

asked on

Getting information from ASP

I need my flash movie to get information from a database. I use asp file to get the information but how do I access the asp file to get the information into a textfield in Flash ?

This is my ASP file :

<% @Language=VBScript %>  
 
<%
sqlString = "select * from score"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver=SQL Server;server=192.168.1.5;uid=sa;pwd=;database=bowling;"
Set res = conn.Execute(sqlString)
Set score = res("frame1")
Response.Write("text="+score)
conn.Close
%>
Avatar of SuperMario
SuperMario

Flash can get parameters from any object using Generator, and also I think there are ways to retrieve values. I'll get back to you with this one...

-Dan
First of all please excuse typos :-)

Hi!

I'm not sure how you are attempting to do this.  First of all, are you using flash generator?  If so then like SuperMario said, you can pass flash parameters from your ASP page.  You can pass those values to Flash template file through the query string. (ie "flashfile.swf?YourVariable=TheValue&YourVariable2=TheValue2").  Using this method you can pass as many values as you need to the flash movie.  If this is the option you are using and need more detail, comment back.

If you are not using generator, then you will need to use asp to read your data from your DB and then to write that data to a text file.  Your Flash movie will then need to read data from that text file.  If this is the option you are using and need more detail, comment back.

Hope this helps.
Avatar of yngvi

ASKER

I just solved the problem by my self... There is an option to read from location in Flash so I just pointed the location to a ASP file. Also I have to make the asp file write out an value like this  text=value then the label in the flash movie has to have the same label as the output of the ASP file. The label would then be "text"
That is what I said in the 2nd part of my answer.  Can I get some points?
ASKER CERTIFIED SOLUTION
Avatar of kikkertm
kikkertm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
nobius

You said the first option only works with flash generator. I'm not sure if I have flas generator.
If a post a new question, can you tell me more about the second option ? ?
Thanks...