I understand the idea of having one cfc hold all your functions, which is
great. I didn't catch the fact you were using Flash Remoting - and hence trying
to call the cfc.function directly from flash instead of calling a cfm. Try
making a simple little cfm page that invokes your cfc and the xmltree method.
Then modify your Flash tree to load that cfm. I know that's not what you want,
but stay with me :)
The cf code would be (assuming the component is located in your webroot
directory):
<cfoutput>
<cfinvoke
component="flashremoting"
method="xmltree"
returnVariable="xmltest"
/>
#xmltest#
</cfoutput>
To call the cfc directly you have to use a special Flash Remoting call to
invoke the method in the cfc. Using the Flash action testXML.load("file") does
just a regular http request (like your browser does) so that's why you'd need
to use a cfm file to invoke your cfc. For the remoting approach you'll need
totally different set of actionscript. For one, you'll need to include the
netservices stuff:
#include "NetServices.as"
#Include "NetDebug.as"
Then you'll define a connection (var xyz =
NetServices.createGatewayConnection();), the component (var myCFC =
xyz.getService("flashremoting", someFunction());), and then invoke the method
(testXML= myCFC.xmltree();). This is where my expertise drops off because I
haven't done enough Flash-CF interaction to get into remoting. Check out this
article for the basics of remoting (including more detail on the actionscript
needed):
http://www.adobe.com/devnet/coldfusion/articles/startremoting.html
Good luck!
Scott
>Scott,
>
>When I run the CFM page it actually outputs at least on the screen the xml
>structure with the data in it.
>
>The xml.load(xxx.cfm) works, but putting flashremoting.xmltree
>(flashremoting is the name of the cfc and xmltree is the name of the
>function inside the cfc) does not.
>
>Calling the cfc function allows for only one page versus multiple pages
>being loaded into your site.
>
>I have used flash remoting and created a service. Then called a function
>that was in the cfc on which the service was created.
>
>It is amazing to me how I can get some stuff but fail miserably at other
>stuff that should be easy.
>
>Thanks for the follow,
>
>I will try your suggestions.
>
>Jim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3601
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15