View Single Post
  #1 (permalink)  
Old 12-02-03, 11:27 PM
Xtremist Xtremist is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Pensacola, FL
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Best way to link images and swf for banner tracking

Hello,

I'm building a banner/ad managment script and I want to be able to track all clicks on images and swf files. I've got it working fine with images but am having a problem when it comes to swf files. I know I can put a link in the swf file but I want a way to link and track without having to use a link in the swf file.

I've tried layers, linking tables, wraping the swf code in a href tags and so on with no results.

Here is the code I use to display the image / swf file.

<% dim thefile, theextension
thefile = (getbanners.Fields.Item("fbannerimageurl").Value)
theextension = right (thefile,3) %>


<% if theextension = "swf" then %>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60">
<param name="movie" value="/bannertrackerasp/banners/<%=thefile%>">
<param name="quality" value="high"> <param name="PLAY" value="<% if (getbanners.Fields.Item("fbannerautoplay").Value) = 1 then
Response.Write "true"
else Response.Write "False"
end if %>"><param name="LOOP" value="<% if (getbanners.Fields.Item("fbannerloop").Value) = 1 then
Response.Write "true"
else Response.Write "False"
end if %>">
<embed src="/bannertrackerasp/banners/<%=thefile%>" width="468" height="60" loop="false" play="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
<% else %>
<a href="click.asp?id=<%=(getbanners.Fields.Item("fba nnerid").Value)%>&count=<%=dcount%>" <% if (getbanners.Fields.Item("fbannerwindow").Value) = 1 then%> target="_blank" <% Else%> target="_top" <% End IF %>><img src="/bannertrackerasp/banners/<%=thefile%>" alt="<%=(getbanners.Fields.Item("fbanneralttext"). Value)%>" border="0"></a>
<% end if %>

It's is using ASP and a access database....

If anyone can offer some assistance, I'd be thankful!

TIA,

Chris
__________________
Chris
http://www.pensacolawebdesigns.com
I know it's not much but I never find time to work on my own site
Reply With Quote