?
Solved

Flash and Invisible CFM interaction

Posted on 2003-11-09
9
Medium Priority
?
410 Views
Last Modified: 2010-04-03
I have a SWF that i want to interact with a database.  I am very familiar with CFMX but I don't really want to embed the swf in a HTML file.  I would rather it run as a exe.  Therefore is there a way to have Flash and CF interact without having to display a CFM page?  Or more succintly, can Flash interact with a database using CF as the medium but not display the cfm file?

I also may be barking up the wrong tree as I have read and heard that Flash will interact directly with a database but I'm not sure where to start with that.
0
Comment
Question by:skibama1
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 5

Expert Comment

by:Calron
ID: 9712832
To have flash interact directly with a database and to run as an exe you will need an additional tool.

http://www.multidmedia.com/software/flashstudio/

is such a tool. It is not free but it provides direct access to an MS Access db, mysql, you can convert your flash swf into an exe or screensaver.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 9734841
Flash alone cannot do anything at all without some type of middle ware like ASP, PHP, CF, or another 3rd party application like the one mentioned above...

another web site that you should take a look at is www.flashjester.com   some of these tools may be useful as well...


so you can rest easy now...  you know the answer to your question...  it can't been done with Flash alone....


rp
0
 
LVL 1

Author Comment

by:skibama1
ID: 9735803
That I know....

What I want to know is how to have Flash interact with a CFM or CFC but never have the CFM/C file be shown in IE.  There has to be a way to pass variables from Flash to CFM without actually displaying the CFM.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Calron
ID: 9737742
I have never done anything using CFM or CFC. I normally use php, here's some links that show how to do it in php, should be similar for CF

http://www.actionscript-toolbox.com/samplephpmysql3.php
http://actionscript-toolbox.com/samplemx_dbedit.php

I can give you more such links if you need them. YOu can also look at the flash API docs for the LoadVars object, which you will have to use to do the whole thing.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 9741042
so do you want to just have the SWF call a page online and get information?


you can create a stand alone player and as long as the user is online, you can call a page a get variables...

you should make sure to have a set of code that checks to see if the user is online, and if not display a message that says so...

you would just build the application that same way you would if it was to be used online...

--------------------------------------

"What I want to know is how to have Flash interact with a CFM or CFC but never have the CFM/C file be shown in IE.  There has to be a way to pass variables from Flash to CFM without actually displaying the CFM. "


but is the above is not what you want, then there is no way to "hide" the CFM...  why exactly are you trying to hide it anyway?

rp


0
 
LVL 1

Author Comment

by:skibama1
ID: 9747191
Because I want it to run independently of IE.  I want to use the swf as a EXE and have all the data calls from the database invisible.  If you send or request data from a CFM page, which is easy to do, the page will open.  Then you have your standalone EXE playing and a blank IE page.
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 9748192
you can send and receive data from a page online using a stand alone application, and there will be no browser window involved....

but the user must be connected to the internet to do this...

all you need to do is use LoadVars();

something like this:

myData = new LoadVars();
myData.variable1 = _root.sendVariable1;
myData.sendAndLoad("http://www.domain.com/thepage.cfm", myData, "POST");

myData.onLoad = function(success){
   if(success){
      _root.receiveVariable2 = myData.variableFromCFMPage;
   } else {
      _root.display.text = "You are not connected.  Please log on to the internet.";
      _root.gotoAndPlay("error");
   }
};


the above code will send a variable, "sendVariable1" to the "thepage.cfm" web page and then when the new information have fully loaded into the .EXE  the new variable "variableFromCFMPage" is set to a variable on the root of the timeline called "receiveVariable2"

this all takes place without any browser windows at all...

let me know if you have any questions...


rp
0
 

Expert Comment

by:agibson1983
ID: 9829908
you want to do Flash remoting..... this is where you can pass entire recordsets from a coldfusion component file to the flash file.

has someone already said this... check out macromedias files to download the remoting components
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 9850879
skibama1,

come back and let us know what is happening with this question...


rp
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question