<mySearch ⁄>
<mySnippets order="rand" ⁄>
<myContacts ⁄><email ⁄>
<windows live messenger ⁄>
<myCurriculum type="pdf" ⁄>
<myBlog show="last" ⁄>
<myNews show="rand" ⁄>
<myNews type="cat" ⁄>
<myQuote order="random" ⁄>Os milagres não acontecem em contradição com a natureza, mas só em contradição com o que sabemos da natureza
<myPhoto order="random" ⁄>
<myAdSense ⁄>
<myVisitorsMap ⁄>
/** * Static Class Events * Manage Events */ Events = function(){} /** * Add Event * * Full credits to (I just made a few mods): * http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html * * @param Object * @param Object * @param Object */ Events.AddEvent = function(obj, type, fn){ if(!obj) return; this.RemoveEvent(obj, type, fn); if (obj.addEventListener) { obj.addEventListener(type, fn, false); } else { if (obj.attachEvent) { obj["e" + type + fn] = fn; obj[type + fn] = function(){ obj["e" + type + fn](window.event); } obj.attachEvent("on" + type, obj[type + fn]); } } } /** * Remove Event * * Full credits to (I just made a few mods): * http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html * * @param Object * @param Object * @param Object */ Events.RemoveEvent = function(obj, type, fn){ if (obj.removeEventListener) { try{obj.removeEventListener(type, fn, false);}catch(e){} } else{ if (obj.detachEvent) { obj.detachEvent("on" + type, fn); obj[type + fn] = null; obj["e" + type + fn] = null; } } }
div.container_protector{} div.youtube_click_video_blocker{ position: absolute; width: 425px; height: 312px; } div.image_blocker{ position: absolute; width: 450px; height: 350px; } img.prevent_click{ width: 100%; height: 100%; }
/** * Startup function * * @author pedrocorreia.net */ Init = function (){ var defs = { id: "my_protected_movie", url: "http://www.youtube.com/v/XKOwGffqlbM", placeholder: "my_placeholder", width: 425, height: 335, ver: "7.0.0" } //we have to add the parameter wmode="transparent" //in order to work var params = {}; params.wmode="transparent"; swfobject.embedSWF(defs.url,defs.placeholder,defs.width,defs.height,defs.ver,"_js_/expressInstall.swf","",params); } Events.AddEvent(window, "load", Init);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Flash and Image Protect</title> <link href="_css_/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="_js_/swfobject.js"></script> <script type="text/javascript" src="_js_/Events.js"></script> <script type="text/javascript" src="_js_/Init.js"></script> </head> <body> <!-- protect_a_Youtube_video --> <div class="container_protector"> <!-- div_blocker --> <div class="youtube_click_video_blocker"> <img src="spacer.gif" class="prevent_click" alt="no_click_please" title="no_click_please" /> </div> <!-- div_blocker/ --> <!-- content_to_protect --> <div id="my_placeholder">Alternative Content if Flash version's not available</div> <!-- content_to_protect/ --> </div> <!-- protect_a_Youtube_video/ --> <br/> <!-- protect_a_regular_image --> <div class="container_protector"> <!-- div_blocker --> <div class="image_blocker"> <img src="spacer.gif" class="prevent_click" alt="no_click_please" title="no_click_please" /> </div> <!-- div_blocker/ --> <!-- content_to_protect --> <img src="protect_image.jpg" width="450" height="350" alt="Protected Image" title="Protected Image" /> <!-- content_to_protect/ --> </div> <!-- protect_a_regular_image/ --> </body> </html>