Method: ArAdRenderer#flash_ad

Defined in:
app/renderers/ar_ad_renderer.rb

#flash_ad(ad) ⇒ Object

Code for flash ad.



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'app/renderers/ar_ad_renderer.rb', line 144

def flash_ad(ad)
  click_tag = ad.link.to_s.size > 5 ? "flashvars=\"clickTag=#{ad.link}\"" : '' 
<<EOT
<div class="link_to_track" id="#{ad.id}">
  <object>
    <param name="wmode" value="transenv" />
    <embed width="#{ad.width}" height="#{ad.height}" src="#{ad.file}" #{click_tag}
           wmode=transenv allowfullscreen='true' allowscriptaccess='always' type="application/x-shockwave-flash"></embed>
  </object>
</div> 

<script type='text/javascript'>
$('##{ad.id}').mousedown(function (e){
    $.post('/ar_common/ad_click', { id: this.id });
    return true;
});
</script>     
EOT
end