Flash and Invisible CFM interaction

Posted on 2003-11-09
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.
Question by:skibama1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1

Expert Comment

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

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.
LVL 22

Expert Comment

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   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....


Author Comment

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.
Industry Leaders: 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!


Expert Comment

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

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.
LVL 22

Expert Comment

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?



Author Comment

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.
LVL 22

Accepted Solution

rascalpants earned 125 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("", myData, "POST");

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

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...


Expert Comment

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
LVL 22

Expert Comment

ID: 9850879

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


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Software Restriction Policy 8 882
Flash player 17 install script .bat or .vbs 9 578
Include Adobe AIR libraries in Flash Builder 4 139
Running Mp4 or Flash Video 1 141
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

726 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