After adding a Flash banner, you will probably notice phpAdsNew won't
log AdClicks for that banner. This is normal behavoir. Usually the target
URLs are hardcoded in the Flash banner and if the user clicks on the banner
it the Flash player will tell the browser to visit the hardcoded URL directly.
An example of an hardcoded URL in Flash 5:

ActionScript variables
To solve this problem we need to tell the Flash player to use the adclick.php
file instead of the hardcoded URL. One way to achieve this effect is to
replace the hardcoded URL with an ActionScript variable, but this is only
possible if you have access to the original Flash movie source.
In the example below the hardcoded URL is replaced with an ActionScript
variable called 'targeturl':

The only thing which remains is to tell the Flash player what URL the
'targeturl' variable should contain.
You can specify the contents of ActionScript variables by adding them
to the movie URL
http://www.flash.com/flashmovie.swf?targeturl=http%3A%2F%2Fwww.foobar.com |
|
The example above will set the targeturl ActionScript variable to http://www.foobar.com.
The effect is the same as the first example, the user will go to the foobar.com
website after clicking on the banner.
{targeturl}
phpAdsNew automatically replaces the string {targeturl} with the correct
code it needs to log clicks for the URL specified in the field 'Linked
to URL'.
http://www.flash.com/flashmovie.swf?targeturl={targeturl} |
|
In the example above {targeturl} will be automatically replaced, and
as a result the targeturl ActionScript variable will be automatically
set to the correct URL needed to log the AdClick. If the user clicks on
the banner the click will be logged and the user will be referred to the
URL specified in the field 'Linked to URL'.
The complete HTML source needed for displaying a Flash banner would become
something like the example below.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=5,0,0,0" WIDTH=468 HEIGHT=60><PARAM
NAME=movie
VALUE="http://www.flash.com/flashmovie.swf?targeturl={targeturl}">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="http://www.flash.com/flashmovie.swf?targeturl={targeturl}"
quality=high bgcolor=#FFFFFF WIDTH=468 HEIGHT=60 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT> |
|
|