I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was working fine, till i decided to add the Application.cfm file for session variables.
Whenever i remove the application.cfm , everything works fine.But if i add it in again, nothing works again.... *sigh*
Error given out by flash is :
Error opening URL "http://192.168.1.6/flash/testing/LoginProcess.cf m"
Anyone knows how to fix this? Application.cfm -
<CFPARAM NAME="timeout" DEFAULT="#createtimespan(0,0,0,5)#">
-
<!--- With Session Management Enabled --->
-
<CFAPPLICATION NAME="Flash" SESSIONMANAGEMENT="YES" SETCLIENTCOOKIES="NO" SESSIONTIMEOUT="#timeout#" >
-
<!--- CF will not set the client cookies automatically, so set them manually as per-session cookies --->
-
<CFIF not IsDefined("Cookie.CFID")>
-
<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="5">
-
<CFCOOKIE NAME="CFID" VALUE="#SESSION.CFID#">
-
<CFCOOKIE NAME="CFTOKEN" VALUE="#SESSION.CFTOKEN#">
-
</CFLOCK>
-
</CFIF>
-
The Action Script - submitURL = "http://192.168.1.6/flash/testing/LoginProcess.cfm";
-
-
//Define function to process form data
-
function checkUser():Void {
-
//Creates an instance of LoadVars to send form data to Coldfusion.
-
// creating an Array with LoadVars called dataOut to send the form data as a bulk to Coldfusion.
-
-
dataOut = new LoadVars();
-
-
//These variables will be the once that will correspond to the variables in Coldfusion.
-
dataOut.Fname = userinput.text;
-
dataOut.Fpwd = passinput.text;
-
-
// Create another LoadVars instance to receive the server's reply
-
replyData = new LoadVars();
-
-
// Initialize reply variable.
-
replyData.reply_username = "";
-
replyData.reply_pwd = "";
-
replyData.reply_status = "";
-
replyData.reply_tokencf ="";
-
replyData.reply_ftoken ="";
-
-
replyData.onLoad = handleReply;
-
-
// Submit the order data
-
dataOut.sendAndLoad(submitURL, replyData, "post");
-
-
}
-
-
function OnReset():Void {
-
userinput.text="";
-
passinput.text="";
-
status_txt.text="";
-
}
-
-
-
function handleReply(success) {
-
if (success) {
-
if (replyData.reply_status) {
-
gotoAndStop(3);
-
-
}
-
else {
-
mx.controls.Alert.show("Login Failed!", "Alert");
-
gotoAndPlay(1);
-
-
}
-
}
-
else {
-
mx.controls.Alert.show("There was a problem submitting your login. The server may be down or not responding.", "Alert");
-
-
}
-
}
The LoginProcess.cf m -
<cfset LoginName=#Fname#>
-
<cfset LoginPwd=#Fpwd#>
-
-
<cfquery datasource="#FlashDB#" name="CheckLogin">
-
Select *
-
From Clients
-
Where AccountName='#LoginName#' AND Password='#LoginPwd#' AND LoginStatus <> 'True'
-
<!--- this is for web login, not flash login --->
-
<!--- AND FlashLogin <> 'True' ***might cause timeout error, if timeout doesnt work*** --->
-
<!---AND suspend <> 'True'--->
-
</cfquery>
-
-
<cfsetting enablecfoutputonly="YES">
-
<cfcontent type = "application/x-www-urlform-encoded">
-
-
<cfif CheckLogin.FlashLogin NEQ True>
-
<cfset LoginStatus=1>
-
<cfset CurrBalance = #NumberFormat(CheckLogin.CurrencyBalance*100, '99')#>
-
<cfset returnToFlash = "&reply_username=#URLEncodedFormat(LoginName)#&reply_pwd=#URLEncodedFormat(LoginPwd)#&reply_status=#URLEncodedFormat(LoginStatus)#&reply_balance=#URLEncodedFormat(CurrBalance)#&reply_nick=#URLEncodedFormat(CheckLogin.LastName)#&reply_clientID=#URLEncodedFormat(CheckLogin.ClientID)#&abc=1234">
-
<cfelse>
-
<cfset LoginStatus=0>
-
<cfset returnToFlash = "&reply_username=#URLEncodedFormat(LoginName)#&reply_pwd=#URLEncodedFormat(LoginPwd)#">
-
</cfif>
-
-
<!--- FlashOutput contains the string that will be sent back to Flash--->
-
<cfprocessingdirective suppresswhitespace="Yes">
-
<cfoutput>
-
#returnToFlash#
-
</cfoutput>
-
</cfprocessingdirective>
Login page, with the flash embedded -
<body>
-
-
<cfoutput>
-
-
<object width="350" height="250">
-
-
<param name="movie" value="Login3.swf">
-
-
<embed src="Login.swf" width="350" height="250">
-
-
</embed>
-
-
</object>
-
-
</cfoutput>
-
-
-
</body>
-
0 1553 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Keith Rowe |
last post by:
Hello,
I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:
Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
On the aspx page I have the object tag as follows:
|
by: zeb |
last post by:
Hi,
How can I have a flash
played in a popup window
when I load my index page ?
Thanks in advance...
|
by: bazzer |
last post by:
hey,
im trying to access a microsoft access database from an ASP.NET web
application in visual basic 2003.NET. i get the following error when i
try running it:
Server Error in '/CinemaBookingSystem' Application.
--------------------------------------------------------------------------------
ERROR General error
Unable to open registry...
|
by: post2google |
last post by:
I was thinking about where to go for lunch the other day, so I went to
hardees.com to see what the menu looked like these days. What
comes up is a big note that my flash version is not new enough so I
can't use the site. What complete losers!
When are businesses going to understand that the purpose of a web
site is to communicate with...
|
by: JJ |
last post by:
Although this question involves Flash, I suspect the actual issue is an asp
one..
I am trying to open the web.sitemap file in an .swf file enbedded in an asp
page (I'm working in VS 2005).
I get an error in Flash when it trys to open this file using standard Flash
commands. However when I change the file name and command to 'Web.xml'
it...
| |
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
|
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32
|
by: Neo Geshel |
last post by:
Greetings.
BACKGROUND:
My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are
delivered as application/xhtml+xml for all non-MS web clients, and as
text/xml for all MS web clients (Internet Explorer).
My flash content was originally brought in via the “flash satay” method,
but I have since used some server-side magic...
|
by: benjaminkang |
last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was working fine, till i decided to add the Application.cfm file for session variables.
Whenever i remove the application.cfm, everything works fine.But...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |