473,548 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flash Unable To Open URL when Application.cfm exists! Why?

4 New Member
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
Expand|Select|Wrap|Line Numbers
  1. <CFPARAM NAME="timeout" DEFAULT="#createtimespan(0,0,0,5)#">
  2. <!--- With Session Management Enabled --->
  3. <CFAPPLICATION NAME="Flash" SESSIONMANAGEMENT="YES" SETCLIENTCOOKIES="NO" SESSIONTIMEOUT="#timeout#" >
  4. <!--- CF will not set the client cookies automatically, so set them manually as per-session cookies --->
  5. <CFIF not IsDefined("Cookie.CFID")>
  6.     <CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="5">
  7.         <CFCOOKIE NAME="CFID" VALUE="#SESSION.CFID#">
  8.         <CFCOOKIE NAME="CFTOKEN" VALUE="#SESSION.CFTOKEN#">
  9.     </CFLOCK>
  10. </CFIF>
  11.  
The Action Script
Expand|Select|Wrap|Line Numbers
  1. submitURL = "http://192.168.1.6/flash/testing/LoginProcess.cfm";
  2.  
  3. //Define function to process form data
  4. function checkUser():Void {
  5.     //Creates an instance of LoadVars to send form data to Coldfusion.
  6.     // creating an Array with LoadVars called dataOut to send the form data as a bulk to Coldfusion.
  7.  
  8.     dataOut = new LoadVars();
  9.  
  10.     //These variables will be the once that will correspond to the variables in Coldfusion.
  11.     dataOut.Fname = userinput.text;
  12.     dataOut.Fpwd = passinput.text;
  13.  
  14.     // Create another LoadVars instance to receive the server's reply
  15.     replyData = new LoadVars();
  16.  
  17.     // Initialize reply variable.
  18.     replyData.reply_username = "";
  19.     replyData.reply_pwd = "";
  20.     replyData.reply_status = "";
  21.     replyData.reply_tokencf ="";
  22.     replyData.reply_ftoken ="";
  23.  
  24.     replyData.onLoad = handleReply;
  25.  
  26.     // Submit the order data
  27.     dataOut.sendAndLoad(submitURL, replyData, "post");
  28.  
  29. }
  30.  
  31. function OnReset():Void {
  32.     userinput.text="";
  33.     passinput.text="";
  34.     status_txt.text="";
  35. }
  36.  
  37.  
  38. function handleReply(success) {
  39.     if (success) {        
  40.         if (replyData.reply_status) {
  41.                         gotoAndStop(3);
  42.  
  43.         }
  44.         else {
  45.             mx.controls.Alert.show("Login Failed!", "Alert");
  46.             gotoAndPlay(1);
  47.  
  48.         }
  49.     }
  50.     else {
  51.         mx.controls.Alert.show("There was a problem submitting your login. The server may be down or not responding.", "Alert");
  52.  
  53.     }
  54. }
The LoginProcess.cf m
Expand|Select|Wrap|Line Numbers
  1. <cfset LoginName=#Fname#>
  2. <cfset LoginPwd=#Fpwd#>
  3.  
  4. <cfquery datasource="#FlashDB#" name="CheckLogin">
  5.     Select * 
  6.     From Clients 
  7.     Where AccountName='#LoginName#' AND Password='#LoginPwd#' AND LoginStatus <> 'True' 
  8.     <!--- this is for web login, not flash login --->
  9.     <!--- AND FlashLogin <> 'True' ***might cause timeout error, if timeout doesnt work*** --->
  10.     <!---AND suspend <> 'True'--->
  11. </cfquery>
  12.  
  13. <cfsetting enablecfoutputonly="YES">
  14. <cfcontent type = "application/x-www-urlform-encoded">
  15.  
  16. <cfif CheckLogin.FlashLogin NEQ True>
  17.     <cfset LoginStatus=1>
  18.     <cfset CurrBalance = #NumberFormat(CheckLogin.CurrencyBalance*100, '99')#>
  19.     <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">
  20. <cfelse>
  21.     <cfset LoginStatus=0>
  22.     <cfset returnToFlash = "&reply_username=#URLEncodedFormat(LoginName)#&reply_pwd= #URLEncodedFormat(LoginPwd)#">
  23. </cfif>
  24.  
  25. <!--- FlashOutput contains the string that will be sent back to Flash--->
  26. <cfprocessingdirective suppresswhitespace="Yes">
  27. <cfoutput>
  28. #returnToFlash#
  29. </cfoutput>
  30. </cfprocessingdirective>
Login page, with the flash embedded
Expand|Select|Wrap|Line Numbers
  1. <body>
  2.  
  3. <cfoutput>
  4.  
  5.         <object width="350" height="250">
  6.  
  7.             <param name="movie" value="Login3.swf">
  8.  
  9.             <embed src="Login.swf" width="350" height="250">
  10.  
  11.             </embed>
  12.  
  13.         </object>
  14.  
  15. </cfoutput>
  16.  
  17.  
  18. </body>
  19.  
Mar 18 '08 #1
4 4034
acoder
16,027 Recognized Expert Moderator MVP
Maybe the timeout is too low. How long does it take the page to open?
Mar 18 '08 #2
benjaminkang
4 New Member
well, the page opens almost instantly since its hosted on a local server.
Mar 19 '08 #3
benjaminkang
4 New Member
ah, my mistake, i just realized that i forgot to cfset datasource.... hahahaha my bad...sorry
Mar 19 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
So why didn't the error message show that?
Mar 19 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
8566
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:
1
1673
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...
0
12014
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...
115
13201
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...
5
1941
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...
0
789
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
3
14036
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
8
5877
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...
0
1553
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...
0
7518
marktang
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...
0
7444
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...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7805
tracyyun
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...
0
6039
agi2029
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...
0
5085
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3478
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1932
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.