|
-
Senior Member
To Read From Database:
Create your ASP script as you normally would to read the details from your DB. Instead of creating the page using HTML and stuff just assign the data from the db to variables, eg..
userName = rs.Fields("userName").Value
password = rs.Fields("userName").Value
once you know this page works without flash move on...
In the flash file (before you need the info from the DB) use loadVariables("nameOfASPPage.asp");
That line opens the ASP file and runs the script and recieves the variables defined within it.
After that you will be able to call userName or password from the root of the movie you put the loadVariables function.
I suggest that in the ASP file you put a loaded=true variable right at the bottom. Then in Flash do a frame loop until loaded == "true". That way you can be sure all your variables are loaded before continuing (took me ages to figure that one out!)
To write to the DB you would do exactly the same but the variables are created in Flash and you use:
loadVariables("nameOfASPPage.asp","","POST");
Then in the ASP file you would use Request("variable")
Any more help you need let me know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|