It's reassuring that Alan had a similar error and got this working.
All I see is perhaps your CF code below is not actually outputting the XML 
object that it is creating. I think you need to add this line at the end:

<cfoutput>#toString(xmlDoc)#</cfoutput>

I think the weird flash output is coming from the actionscript line:
    textXML.text = this
I could be wrong, but I don't think "this" is a plain string object that can be 
sent to a text field. You could try just echoing out a part of the xml object 
like:
    textXML.text = testXML.lastChild.nodename

As for making the dynamic XML bit a cfc, I think that would be fine, but as I 
understand it (I'm still getting into using cfcs) you'd still need to have 
Flash call a CFM page to invoke the cfc. At that point I'm not sure if creating 
the separate cfc saves you anything unless you plan to reuse this method in 
other things.

-Scott

>I am just checking to see if this has been resolved as I get the same error
>as Alan did. I actually get the cf code and not data returned too the flash
>object.
>
>Also I would like to know if the xml.Load(xxx.cfm) part could actually be a
>cfc method
>
>Here is my cfm, this actually works and returns an xml structure.
>
><cfquery name="GetRules" datasource="MFRRules">
>SELECT a.tab, b.subtab, b.caption, b.rulekey, b.zipname, b.licensee,
>b.source, b.reason, b.comments
>from rules a, rules b
>where a.tab=b.tab 
>order by a.tab, b.subtab, b.caption
></cfquery>
>
><cfxml variable="xmlDoc">
>       <node label="Tabs">
>               <cfoutput query="GetRules"  group="tab">
>
>                       <node label="#tab#">
>                               <cfoutput group="subtab">               
>                                       <node label="#subtab#">
>                                               <cfoutput group="caption">
>                                                       <node 
>       
>label="#XMLFormat(caption)#" 
>       
>Rulekey="#rulekey#"
>       
>URL="http://www.myfirerules.com/downloads/rules/#zipname#";
>       
>zipname="#zipname#"
>       
>licensee="#licensee#"
>       
>rulecaption="#XMLFormat(caption)#"
>       
>rulesource="#source#"
>       
>reason="#XMLFormat(reason)#"
>       
>comments="#XMLFormat(comments)#"
>                                                       />
>                                               </cfoutput>
>                                       </node> 
>                               </cfoutput>
>                       </node>
>               </cfoutput>
>       </node> 
></cfxml>
>
>
>Here is the action script 2.0 stuff
>
>var testXML:XML = new XML();
>testXML.ignoreWhite = true;
>
>testXML.onLoad = function(success){
>       if(success){
>               textXML.text = this; //display the xml in a dynamic text box
>on the stage
>       }else{
>               //throw error
>               trace("file not found");
>       }
>}//end onLoad function
>
>
>//path to the cf script file
>testXML.load("xmlTree.cfm");
>
>
>myTreeDataProvider = new XML(); 
>// ignore whitespace in XML (important)
>myTreeDataProvider.ignoreWhite = true; 
>// load external XML file
>myTreeDataProvider.load("xmlTree.cfm"); 
>// onLoad handler for XML data 
>
>myTreeDataProvider.onLoad = function()
>{ tree_control.dataProvider = myTreeDataProvider;
>}
>
>
>The first part returns the xml to a dynamic text box. All I see is the
><cfxml> code from the cfm page
>
>I tried to put this into a flash tree component and I get some bizarre
>problem of [type Function], [type Function] etc
>
>It some what works in that the tree has some data but it is not formatted
>correctly. It stops at the caption part of the cfm page with regards to
>results returned.
>
>I am thinking that this could be a white space issue. But I am too new to
>know better.
>
>Thanks 
>
>Jim
>
>
>
>Could this be a cfc method as well?
>
>I've only used the tree component a little, but I think that would work
>fine. You don't need to do anything in Flash but change the path/filename of
>the xml file it's using to be the coldfusion page which will output the xml
>dynamically. The Coldfusion file will follow the loose code that Alan
>outlined in the first post.
>
>-Scott
>
>method
>>if you need to refresh the data without refreshing your HTML window.
>>
>>-Scott 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:3593
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to