Shane,

Thanks for the sniplet I will give it a try this weekend!


Cya,

Greg Z



-----Original Message-----
From: Shane Johnson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 8:02 AM
To: Fusebox
Subject: RE: XFB fusebox and Flash 5


As far as the code in Flash it self there isn't much to show, here is the
actionscript to acquire the news data:

loadVariablesNum ( "http://localhost/cflash/index.cfm?fa=nws.nwsHome&news="
add news, 0, "GET");

thats it.

....then make a dynamic text box with "html" enabled (checkbox) and in the
"variable" box  put "news".

The rest is standard CF, just dumb your html output down to font and <br>
tags, wrap it in <cf_bodycontent> ... ok here...

my case statement:

            <cfcase value="nwsHome">
                        <cfinclude template="qryListNewsItems.cfm">
                        <cfinclude template="dspViewNews.cfm">
                </cfcase>

my dsp file code:

<cfmodule template="#request.cfroot#/tags/bodycontent.cfm">
        <CFOUTPUT QUERY= "viewNewsItems" group="newsDate">
                <CFSET newsdate = #newsDate#>
                <br>
                <font
color="##FFCC00"><b>#dateFormat(CreateODBCdate(newsDate), "mmmm d,
yyyy")#</b></font>
                <br><br>

                <CFOUTPUT>
                        <font color="##999999"><b>#newsHeadline#</b></font>
                        <br>
                        #ParagraphFormat("#newsBody#")#
                        <br><br>
                </CFOUTPUT>
        </CFOUTPUT>
</cfmodule>

<cfset bodycontent = #request.bodycontent#>

<cfmodule template="#request.cfroot#/tags/StripWhitespace.cfm">
        <cfoutput>&news=#bodycontent#&nwsStatus=1</cfoutput>
</cfmodule>

Thats all there is too it.  The "&nwsStatus=1" part is for ensuring the data
gets fully loaded.  The transition animation will keep looping until
nwsStatus=1. The actionscript for that is...

if ( nwsStatus ne "" ) {
        gotoAndStop (32);

} else {
        gotoAndPlay (1);


}

The transition animation is 32 frames long.  I thought it funny that a
fusebox tag (bodycontent) allowed me to do this so easily.  Everyone else is
using wddx but with all the serialization and de-serialization it just
seemed to add a huge layer of processing and complexity. I knew there had to
be an easier way.

Stripwhitespace is needed to preserve your layout as all the gaps from the
cf code end up in the flash text box and show up in the final display.

Questions?





-----Original Message-----
From: Adam Reynolds [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 1:12 AM
To: Fusebox
Subject: RE: XFB fusebox and Flash 5


Shane,
I would really like to look at how you plugged in Flash 5 and Fusebox. Are
you going to allow people to download source code?

Adam


Comments and suggestions please...



Shane Johnson
Coldfusion Developer
Fusebox [XFB]
www.strangetactics.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to