Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
CenturyMan1979 #1
Flash, Coldfusion, and MySql
Alright so what I want to do is this,
1. Send Variables from flash to coldfusion
2. Have coldfusion query mysql using variables from flash
3. Return the data to flash and use it
So I have a flash set up on the stage with a input text field for me to enter
in a first name. I also have a submit button used to send the first name to the
coldfusion script. Then I have to Dynamic text field to display the first_name
I get back from the database.
// Setup Query Button
qButton.addEventListener(MouseEvent.CLICK, runQuery);
function runQuery(evt:MouseEvent):void {
tStatus.text = "Start Query Handler";
var myData:URLRequest = new URLRequest("query.cfm");
myData.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();
variables.userName = qName.text;
myData.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(myData);
tStatus.text = "End Query Handler";
}
function completeHandler(evt:Event):void {
tStatus.text = "Start Complete Handler";
rtnName.text = evt.target.data.first_name;
tStatus.text = "End Complete Handler";
}
Then I have my coldfusion script called query.cfm.
<cfsetting enablecfoutputonly="YES">
<cfset user="root">
<cfset pass="pass">
<cfset dataSrc="testDB">
<cfset userName = form.userName>
<cfquery name="qUsers" datasource="#dataSrc#" username="#user#"
password="#pass#">
SELECT * FROM users WHERE first_name = "#userName#";
</cfquery>
<CFOUTPUT QUERY="qUsers">&first_name=#first_name#</CFOUTPUT>
Problem is in the flash it never seems to run the completeHandler function and
I can't figure out if it is an issue in the flash script or the coldfusion
script. Any help on this would be appreciated greatly.
CenturyMan1979 Guest
-
Web Hosting for Flash/ColdFusion/MySQL
I am new to Flash and interesting in creating simple forms/guestbooks using flash. My web hosting service supports most php & mysql technology. Most... -
Flash Remoting & ColdFusion & MySQL
hey flash gurus, i'm trying to display some images of products from a recordset that returns from MySQL in Flash with no luck whatsoever... ... -
Flash Form to Coldfusion Component to MySQL
hello, could someone please help me with an issue i'm having.... i'm trying to pass data from flash form fields into my coldfusion component... -
Flash-ColdFusion-MySQL
I'm looking for a strong step-by-step tutorial that can step me through setting up a connection to a mysql database via ColdFusion, PHP, or some... -
mysql 4 with coldfusion 5
is this at all possible? is it possible to use jdbc with coldfusion 5? or would I need to use something else to get connectivity cheers shayne



Reply With Quote

