View Full Version : how can I use a SQL database to load swf's?
Guitar101
December 26th, 2006, 06:48 PM
I'm creating a flash site with a tech support page for a customer with about 300 clients...I'm a noob to mysql, and having trouble with one simple application. the user's login needs to determine which swf is loaded into a load frame on the site. I know it's simple, but as I said I'm a noob, and I've been searching forums all over for a tut, if anyone can help me, or point me at a tut it would be much appreciated.
I know how to trigger a loader based upon an xml, and assume that I can use php to create/modify said xml, but I do not know how to call up which file to load based upon the login...
different customers have different hardware, and the login needs to call up their hardware's documentation. pretty simple
THANX.
duncanhall
December 27th, 2006, 08:52 AM
I'd do it using Flash remoting. Download the Flash Remoting components from the Adobe site, and then download and install amfphp (http://www.amfphp.org) on your server.
I'd have a MySQL table that stored usernames, passwords and the location of the relevant swf file for each customer (along with a unique ID for each one).
Then, once the user has successfully logged in, just something like:
"SELECT swf_file FROM users WHERE id='whatever'"
Then you can do whatever you want with the file path string.
bwh2
December 27th, 2006, 10:48 AM
I'd have a MySQL table that stored usernames, passwords and the location of the relevant swf file for each customer (along with a unique ID for each one).^ i wouldn't do this. i would do this:
tbl_users
--------------------
user_id
user_name
user_password (md5 or sha1 hash)
tbl_swf
-------------------
swf_id
swf_url
user_id
Guitar101
December 30th, 2006, 04:30 AM
^ i wouldn't do this. i would do this:
tbl_users
--------------------
user_id
user_name
user_password (md5 or sha1 hash)
tbl_swf
-------------------
swf_id
swf_url
user_id
I can create the tables, but my problem is not in their creation, but their use. how do I reference these tables from flash?
Sinister Rouge
December 30th, 2006, 04:32 AM
Check out this tutorial here (http://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm).
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.