all groups > coldfusion flash integration > august 2005 >
You're in the

coldfusion flash integration

group:

Passing Query Data to New Flash Movie


Passing Query Data to New Flash Movie UGA_Bulldawg
8/26/2005 7:05:52 PM
coldfusion flash integration:
I have a cfm page that runs a query. If this query returns more than a
specific number of rows I want to load the data into a flash datagrid rather
than painting it to the screen in html (html takes way too long and freezes up
with high recordcounts). The problem I am having is getting the recordset into
Flash and this is why: The cfm runs the query and it decides that it needs to
be displayed in flash. It then processes the the object tag that loads the
flash movie. Since the movie is loading via the "object" tag, it's having a
problem getting the recordset results into flash the recently opened Flash.
The Flash.result method is designed to return data back to the flash file that
called it. In this case, a Flash file is not calling the cfc. My cfm page is
actually including it.

If you followed all of that, here is what I need to know. How do I send
information to a .swf file that did NOT call the page. The cfm page has
already run the query and determined it was going to send it to a flash file.
There is no need to re-run the query. I just need to open up my flash movie
using the object tag(which works) , and have flash use data from the cfm page
that the user has already loaded.

Thanx
Re: Passing Query Data to New Flash Movie Dan Bracuk
9/4/2005 12:00:00 AM
If all you need from flash is the datagrid, and you are using version 7 of cold
fusion, this should work.

<cfif recordcount lt something>
output to html
<cfelse>
<cfform format = "flash">
<cfgrid>
etc

If you are writing your own swf, well that's a bit different.

Put your query into a web service and cache it. Then your swf can pick up the
cached query from the webservice.
AddThis Social Bookmark Button