Hi Scott,
Thanks for the reply. I'm doing something very similar. The flash code is as
follows:
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("createxml.cfm");
But when I execute the html file containing .swf file the first line of
createxml.cfm is returned to the browser and not the actual xml output i.e.
<cfset variable =>
and not the xml output. Not good on a Friday afternoon!
thanks again,
alan
> (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
>
> > Hi,
> >
> > I hope I'm not going over old ground here but I cant find an exact
> > answer on my query here.
> >
> > I'm creating an xml file dynamically from a query. I want to then
> load
> > this xml file into a flash movie where it can process the data
> >
> > I've got a file createxml.cfm which does the following:
> >
> > <cfset some variables>
> > <cfquery querydb>
> > <cfxml variable....>
> > populate xml file/structure
> >
> > <cfcontent type="text/xml" reset="Yes" />
> > <cfset dynXML = "#toString(variable)#">
> >
> > This outputs an xml file with the correct headers
> >
> > I'm under instruction not to create a physical file on the server so
>
> > how should I go about getting this xml file into a .swf file
> >
> > What I'm really unsure about is how do I tie all this together ?
> >
> > Should I create another file, say displayflash.cfm where it executes
>
> > createxml.cfm and I can embed the flash movie ?
> > What is the best way to get the flash movie to access the dynamic
> xml
> > ?
> >
> > Am I over thinking this ???
> > Apologies if
> >
> > a:) this was asked previously
> > b:) I'm on the wrong forum!
> >
> > thanks in advance
> >
> > alan
> >
> >
> >
> >
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:3586
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15