I'm having a problem with Flash Remoting and after having a fellow programmer look at it, she and I haven't been able to determine what the problem is...so I thought perhaps someone here would either A. have an idea or B. point me in the direction of an idea.
The scenario:
I set a session variable on a cfm page (SESSION.mapId) that will be used in a moment. From the cfm page, I allow the user to click on a link and open a new window with a flash swf on it. On the newly opened page, I use Flash Remoting. Flash calls a cfc to query the database and pull out the required map image to display. Within the CFC (as shown below), I have a query statement that has a where statement which uses the session variable I set earlier on. Once the appropriate information is pulled out of the database, it is returned to Flash where the image is presented within the SWF.
So the flow is:
cfm page (caller page) [session variable with mapId set] ---> new window with Flash SWF ---> SWF calls CFC to query the database using session.mapId ---> data returned from the cfc is returned to Flash whereby Flash can display the appropriate image.
Now if I happen to hard code my where statement and rather than use a SESSION variable use a specific item, my application works. Likewise, if I use a SESSION variable even though the SWF doesn't display the correct image, (in fact, it doesn't display any image), I can do a cfdump on the page that the SWF sits on and all of the proper variables are output using the session variable that I mentioned a moment ago. I have used session variables within CFCs before for the express purpose of passing certain information into a Flash Remoting Session and it worked successfully and it was almost the same exact scenario. The only difference is that I did this about a year and half ago and Remoting has changed since then. So basically, I am stumped now and cannot figure out why this isn't working for me.
In case this helps, the function from the cfc:
<cffunction name="getImage" access="remote" returntype="string" output="true">
<cfquery name="qGetImage" datasource="datasource_db">
SELECT image
FROM MapImages
WHERE mapId = '#SESSION.mapId#'
</cfquery>
<cfquery name="qGetImage" datasource="datasource_db">
SELECT image
FROM MapImages
WHERE mapId = '#SESSION.mapId#'
</cfquery>
<cfset thisImage = "#qGetImage.image#">
<cfreturn thisImage>
</cffunction>
</cffunction>
Ok, someone out there point me in the right direction, please.
Thanks,
Justin
_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.HostMySite.com www.teksystems.com/
