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
-----Original Message-----
From: Jim Schell [mailto:[EMAIL PROTECTED]
Sent: Friday, April 25, 2008 6:26 PM
To: CF-Newbie
Subject: RE: Load dynamically created xml into Flash
Could this be a cfc method as well?
-----Original Message-----
From: Scott Sedam [mailto:[EMAIL PROTECTED]
Sent: Friday, April 25, 2008 9:30 AM
To: CF-Newbie
Subject: Re: Load dynamically created xml into Flash
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
>Ok,
>
>A twist on this would be the tree control inside flash that uses xml as the
>datasource.
>
>I currently use this via a hardcoded xml file but would lke to change it to
>a query based xml file if that makes sense
>
>Will your function allow for this?
>
>Jim
>
>(Sorry about my first errant reply to the list)
>
>You've got the right idea on the CF side. What I've done recently is place
>your swf in a typical HTML page and have it (the swf) call the cfm page
>using a load xml function - the actionscript is roughly:
>
>XML.prototype.ignoreWhite = true;
>dataXML = new XML();
>dataURL = "./createxml.cfm";
>dataXML.load(dataURL);
>dataXML.onLoad = ...some function to proceed to in the swf...
>
>Works like a charm and you can have a flash event recall the XML load
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:3590
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15