Here is the thread that helped me ----- Original Message ----- From: "Mark Zukiwsky" <[EMAIL PROTECTED]> To: "Sean Renet" <[EMAIL PROTECTED]> Sent: Saturday, March 04, 2000 11:11 PM Subject: Re: Flash w/ CF > >Mark I went to flasher and I do not see an archive for the list. could you > >forward me your post. I am trying to figure out how to use flash to > >retrieve variables from CF also. > > Hi Sean, > > Here's my post to the Flasher list from last week. They were asking > the same thing you were. > > Just a note about the use of lists - this code was originally for use > in Director Shockwave. I used lists so I could suppress white space > and extraneous tab characters that were ending up in my variables, > and for passing cf lists directly to Lingo Lists. > > Contact me if you have any questions. > > Mark Zukiwsky > Edmonton, Canada > > -------------------------------------------------------------------------- ----- > Date: Thu, 2 Mar 2000 14:24:00 -0700 > To: Flash List > From: Mark Zukiwsky <[EMAIL PROTECTED]> > Subject: Re: FLASH: Can anyone help me with flash and Cold Fusion? > Cc: [EMAIL PROTECTED] > Bcc: > X-Attachments: > > Hi Sarah, > > Here's an example of a ColdFusion template that I'm using to get data > into Flash. I'm using the POST function in Flash to fetch my > variables. My Flash Post action is something like: > > Set Variable: "baseURL" = "http://mark.foxmicro.net/flash/" > Set Variable: "CFtemplate" = "getMenuData.cfm" > Set Variable: "SiteID" = 1 > Set Variable: "eof" = 0 > Set Variable: "index" = 1 > Load Variables (baseURL & CFtemplate, 0, vars=POST) > Go to and Play ("Check") > > That calls the following ColdFusion template: > ------------------------------------------------ > <cfsetting showdebugoutput="no"> > <cfsetting enablecfoutputonly="yes"> > <cfcontent type="text/plain"> > > <!--- get training menu data, be sure to pass FORM.siteID ---> > <cfquery name="flashtext" datasource="MyDatabase" dbtype="OLEDB"> > SELECT busUnit, unitName, novaUnit, activeUnit > FROM UnitTBL > WHERE SiteID = #Trim(FORM.SiteID)# > ORDER BY novaUnit, unitName > </cfquery> > > <!--- Convert query results into list ---> > <cfset unitList = valueList(flashtext.busUnit)> > <cfset nameList = valueList(flashtext.unitName)> > <cfset novaList = valueList(flashtext.novaUnit)> > <cfset activeList = valueList(flashtext.activeUnit)> > > <cfset unitReturn = ""> > <cfset nameReturn = ""> > <cfset novaReturn = ""> > <cfset activeReturn = ""> > <cfloop index = "unitIndex" from = "1" To = "#ListLen(unitList)#"> > <cfset tempUnit = ListGetAt(unitList, unitIndex)> > <cfset unitX = "unit" & unitIndex> > <cfset tempName = ListGetAt(nameList, unitIndex)> > <cfset unitNameX = "unitName" & unitIndex> > <cfset tempNova = ListGetAt(novaList, unitIndex)> > <cfset companyX = "company" & unitIndex> > <cfset tempActive = ListGetAt(activeList, unitIndex)> > <cfset activeX = "active" & unitIndex> > <cfoutput>&#unitX#=#tempUnit#</cfoutput> > <cfoutput>&#unitNameX#=#URLEncodedFormat(tempName)#</cfoutput> > <cfoutput>&#companyX#=#tempNova#</cfoutput> > <cfoutput>&#activeX#=#tempActive#</cfoutput> > <cfoutput>#chr(13)#</cfoutput> > </cfloop> > <cfoutput>&unitCount=#flashtext.recordCount##chr(13)#</cfoutput> > <cfoutput>&eof=1</cfoutput> > ------------------------------------------------ > > The above template would return output like: > ------------------------------------------------ > &unit1=1&unitName1=NOVA%20%2D%20Joffre%20Personnel&company1=True&active1=Tru e > &unit2=11&unitName2=Coutts%20Electrical%20Ltd%2E&company2=False&active2=True > &unit3=3&unitName3=HATSCAN&company3=False&active3=True > &unit4=4&unitName4=Modern%20Plant%20Services&company4=False&active4=True > &unit5=10&unitName5=multimedia%20works&company5=False&active5=False > &unit6=12&unitName6=O%27Reilly%20Insulators%20Inc%2E&company6=False&ac > tive6=True > &unit7=2&unitName7=Quinn%20Contracting&company7=False&active7=True > &unitCount=7 > &eof=1 > > Then in Flash I'd check whether the variables have been loaded by > checking the value that the value of eof = 1: > > If (eof = 1) > Go to and Play ("Done") > Else > Go to and Play ("Check") > End If > > After the variables have been loaded, I use this action to convert > the results to variables: > > Loop While (index <= unitCount) > Set Variable: "tempUnitID" & index = Eval("unit" & index) > Set Variable: "tempUnit" & index = Eval("unitName" & index) > Set Variable: "tempCompany" & index = Eval("Company" & index) > Set Variable: "tempActive" & index = Eval("active" & index) > Set Variable: "index" = index + 1 > End Loop > Go to and Play ("Display") > > Now, depending on what you're doing in your display, the results > should display something like: > > http://mark.foxmicro.net/flashmenu/ > > This example posts a random siteID to the ColdFusion template. To see > the data that is used to build this menu try: > > http://mark.foxmicro.net/cf_flash/flashtest3.cfm?SiteID=1 or SiteID=11937 > > I hope this helps. > > Mark Zukiwsky > Edmonton, Canada > ------------------------------------------------------------------------------ Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.