Your IP does not allow Custom Tags?  Why not just put the tag in the
same folder as calling template?  It does not HAVE to go in Custom Tags
folder on server (although it is preferable).

-----Original Message-----
From: Guy McDowell [mailto:[EMAIL PROTECTED]]
Sent: 13 July 2001 13:35
To: CF-Talk
Subject: Refresh Banner Rotator


Hi folks,

I'm doing a simple banner rotator using CF and Flash 4. What I would
like it 
to do is change the banners dynamically without refreshing the entire
page 
via meta refresh.

I've seen a few custom tags that do that nicely, but my ISP doesn't
allow 
custom tags. I could cfmodule it in but then I'd have it in a bazillion 
directories and I'd rather not do that.

Any ideas? Is JavaScript the answer here?

Also, I'd like to be able to pass the variables into the Flash, but the
only 
tutorial I found on this uses Flash5 not 4 so I can't read it.

Code follows for selecting the banners and tracking them. Code modified
from 
TeraTech ColdCuts.

<!--- Determine number of banners --->
<cfquery name="CountBanners" datasource="MyDatasource">
SELECT Sum(1) AS rnum
FROM Banners
</cfquery>

<cfset R1 = RandRange(1,CountBanners.rnum)>

<!--- Retrieve a banner and assocated link --->
<cfquery name="PickBanner" datasource="MyDatasource">
SELECT RecID, BNRFile, BNRViews, BNRLink
FROM Banners
WHERE (((RecID)=#R1#))
</cfquery>

<cfset NewBNRViews = PickBanner.BNRViews + 1>

<!--- Update the number of views --->
<cfquery name="UpdateView" datasource="MyDatasource">
UPDATE Banners SET BNRViews = #NewBNRViews#
WHERE (((RecID)=#R1#))
</cfquery>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4
,0,0,0" 
ID=OFAHBannerAds WIDTH=450 HEIGHT=75>
<cfoutput query="PickBanner">
<PARAM NAME=movie VALUE="#BNRFile#">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=##FFFFFF>
<EMBED src="#BNRFile#"
quality=high bgcolor=##FFFFFF
WIDTH=450 HEIGHT=75
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_P
rod_Version=ShockwaveFlash">
</EMBED>
</cfoutput>
</OBJECT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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