Hi guys,
Just want to share few things on how to accomplish this using Advertisement module. All sample files are in attached zip:

1. Create and test a separate html file Flash-HTML5.html (attached) with either 'HTML5 with Flash fallback' (Flash fallback for browsers that do not support HTML5 - ie 6-9) or 'Flash with HTML5 fallback' (HTML5 fallback for browsers that do not support Flash - iOS devices).
Please note: If you already have My_Flash.swf (not included) file you may use Google's Swiffy to create HTML5 from it:
http://www.google.com/doubleclick/studio/swiffy

2. Create and test an iframe.html file (attached) , that calls Flash-HTML5.html inside of the iframe tag. The iframe is overlayed with clickable transparent image, that will help us to count clicks and redirect browser to the ad's destination URL ( http://www.codingforums.com/archive/index.php/t-248512.html). Link for that image will be the one of the ad module's special links (/ad/redirect/xxxx/txxxx - I just copied it from source htm, using FireBug inspector, or ad/redirect/nodeid) and we enter it once we created HTML ad.
Please note: You may get "flash object is getting on top of the ad's clickable area" issue. You may either add the same link inside your flash file or just use this workaround:
http://www.leosquarez.com/embed-videoflash-z-index-issue

3. Now when iframe.html file is tested, create HTML ad and copy HTML code (attached) inside HTML body. In the FireBug inspector look for your xxxx and txxxx numbers /ad/redirect/xxxx/txxxx for that new HTML ad:

<div class="clearfix" id="block-ad-2415">  
  <div class="content">
      <div class="html-advertisement" id="ad-5697">

this makes link='/ad/redirect/ 5697/t2415'
url path, /ad/redirect/ 5697/t2415 is already counting the clicks on html ad so all that is left is to redirect it to the proper destination URL. As at this moment you will get in the new tab website's homepage.

4. This will do the last required thing - will redirect browser to the proper destination URL:
http://drupal.org/node/218414#comment-5602794

Please feel free to add your comments and make this case study even better.

Thank you,
Gennady

CommentFileSizeAuthor
iframe_with_Flash_HTML5_fallback.zip2.35 KBgennadiy

Comments

lrwebks’s picture

Status: Active » Closed (outdated)

Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!