Solved

Flash and Invisible CFM interaction

Posted on 2003-11-09
9
398 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 5

Expert Comment

by:Calron
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
Comment Utility
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 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
skibama1,

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


rp
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now