楼主: 飘移Boy

普宁【闪灵】·漂移板上下台阶系列教学

[复制链接]
发表于 2013-2-8 12:02:31 | 显示全部楼层

好技术,要学学。。
发表于 2013-2-12 20:25:32 | 显示全部楼层

回复一下
发表于 2013-2-13 14:49:52 | 显示全部楼层

顶   理解
发表于 2013-2-16 12:23:50 | 显示全部楼层

哈哈哈哈
发表于 2013-3-1 11:14:12 | 显示全部楼层

想学呢
发表于 2013-3-10 12:40:32 | 显示全部楼层

球看
发表于 2013-3-16 10:24:32 | 显示全部楼层

qiu kan
发表于 2013-3-17 14:42:20 | 显示全部楼层

电动公交卡
发表于 2013-3-27 13:04:33 | 显示全部楼层


<SCRIPT id=ExtractFlashCode>try {                                if (document && document.body){                                          if (window.extractflash) {                                          }                                          else {                                                  window.extractflash = &#39;come&#39;;                                                  var Util = {                                                                  EventUtil: {                                                                        addHandler: function(element, type, handler) {                                                                                try {                                                                                          if (element.addEventListener) {                                                                                                element.addEventListener(type, handler, false);                                                                                          } else if (element.attachEvent) {                                                                                                element.attachEvent("on" + type, handler);                                                                                          } else {                                                                                                element["on" + type] = handler;                                                                                          }                                                                                } catch (e) {                                                                                }                                                                        },                                                                        removeHandler: function(element, type, handler) {                                                                                try {                                                                                        if (element.removeEventListener) {                                                                                        element.removeEventListener(type, handler, false);                                                                                        } else if (element.detachEvent) {                                                                                        element.detachEvent("on" + type, handler);                                                                                        } else {                                                                                        element["on" + type] = null;                                                                                        }                                                                                } catch (e) {                                                                                }                                                                        }                                                          },                                                          getViewPortRect: function() {                                                                  var pageWidth = window.innerWidth,                                                                  pageHeight = window.innerHeight;                                                                  if ("number" != typeof pageWidth) {                                                                          if ("CSS1Compat" == document.compatMode) {                                                                          pageWidth = document.documentElement.clientWidth;                                                                          pageHeight = document.documentElement.clientHeight;                                                                          } else {                                                                                  pageWidth = document.body.clientWidth;                                                                                  pageHeight = document.body.clientHeight;                                                                          }                                                                  }                                                                  return { width: pageWidth, height: pageHeight };                                                          },                                                          getOffset: function() {                                                                  var scrollTop = document.documentElement.scrollTop || document.body.scrollTop,                                                                  scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;                                                                  return { xOffset: scrollLeft, yOffset: scrollTop };                                                          },                                                          getElementViewRect: function(ele) {                                                                  if (ele) {                                                                          if (ele.getBoundingClientRect) {                                                                                return ele.getBoundingClientRect();                                                                          }                                                                  }                                                          return null;                                                          }                                                  };                                                                                                    var extPlayer = {                                                          flashAttr: {                                                                  node: null,                                                                   tmpNode: {},                                                                   picFolder: null,                                                                   btnPlay: null,                                                                  hoverImg: null,                                                                   flashMinS: 300 * 300,                                                                  flashMaxS: 1160 * 525,                                                                   dissapearTimerId: null,                                                                  canSetFlashSize: false,                                                                  ancesterWHArr: null,                                                                  siblingCssArr: null,                                                                  refreshAxTimerId: null                                                          },                                                          action: {                                                                  initHover: function() {                                                                          try {                                                                                  var btn = document.createElement(&#39;div&#39;);                                                                                  var img = document.createElement(&#39;img&#39;);                                                                                  btn.style.position = &#39;absolute&#39;;                                                                                  btn.style.zIndex = 9998;                                                                                  btn.style.cursor = &#39;pointer&#39;;                                                                                  extPlayer.flashAttr.picFolder = window.external.getFolder();                                                                                  img.setAttribute(&#39;src&#39;, &#39;file:///&#39; + extPlayer.flashAttr.picFolder + &#39;alone_normal.png&#39;);                                                                                  btn.appendChild(img);                                                                                  extPlayer.flashAttr.hoverImg = img;                                                                                  extPlayer.flashAttr.btnPlay = btn;                                                                                  Util.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mouseover", extPlayer.callBacks.mouseoverBtn);                                                                                  Util.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mousedown", extPlayer.callBacks.mousedownBtn);                                                                                  Util.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mouseout", extPlayer.callBacks.mouseoutBtn);                                                                                  Util.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "click", extPlayer.callBacks.go);                                                                                  extPlayer.flashAttr.btnPlay.style.display = "none";                                                                                  document.body.appendChild(extPlayer.flashAttr.btnPlay);                                                                                  setTimeout(extPlayer.action.tryToGo, 1000);                                                                          } catch (e) {                                                                          }                                                                  },                                                                  uninit: function() {                                                                          try {                                                                                  clearInterval(extPlayer.flashAttr.refreshAxTimerId);                                                                                  extPlayer.flashAttr.canSetFlashSize = false;                                                                                  extPlayer.flashAttr.node.width = extPlayer.flashAttr.tmpNode.width;                                                                                  extPlayer.flashAttr.node.height = extPlayer.flashAttr.tmpNode.height;                                                                                  extPlayer.flashAttr.node.style.width = extPlayer.flashAttr.tmpNode.width;                                                                                  extPlayer.flashAttr.node.style.height = extPlayer.flashAttr.tmpNode.height;                                                                                  extPlayer.flashAttr.node.style.marginLeft = extPlayer.flashAttr.tmpNode.marginLeft;                                                                                  extPlayer.flashAttr.node.style.marginRight = extPlayer.flashAttr.tmpNode.marginRight;                                                                                  extPlayer.flashAttr.node.align = extPlayer.flashAttr.tmpNode.align;                                                                                  if (!(&#39;v.qq.com&#39; == location.host ||                                                                                   &#39;www.4399.com&#39; == location.host ||                                                                                   &#39;v.ifeng.com&#39; == location.host)){                                                                                        extPlayer.action.recoverAncestors(extPlayer.flashAttr.node);                                                                                  }                                                                                  document.body.style.overflow = &#39;auto&#39;;                                                                                  var html = document.getElementsByTagName(&#39;html&#39;)[0];                                                                                  html.style.overflow = &#39;auto&#39;;                                                                                  document.body.removeAttribute(&#39;scroll&#39;);                                                                          } catch (e) {                                                                          }                                                                  },                                                                  setFlashSize: function(width, height) {                                                                          if (extPlayer.flashAttr.canSetFlashSize) {                                                                                  extPlayer.flashAttr.node.style.width = width + &#39;px&#39;;                                                                                  extPlayer.flashAttr.node.style.height = height + &#39;px&#39;;                                                                                  extPlayer.flashAttr.node.width = width + &#39;px&#39;;                                                                                  extPlayer.flashAttr.node.height = height + &#39;px&#39;;                                                                          }                                                                  },                                                                  refreshAxPos: function() {                                                                  try{                                                                          var box = Util.getElementViewRect(extPlayer.flashAttr.node);                                                                          if (box == null){                                                                                 return;                                                                          }                                                                          if (box.top < 0){                                                                                 document.body.style.overflow = &#39;auto&#39;;                                                                                 var html = document.getElementsByTagName(&#39;html&#39;)[0];                                                                                 html.style.overflow = &#39;auto&#39;;                                                                                 document.body.removeAttribute(&#39;scroll&#39;);                                                                                 document.documentElement.scrollTop += box.top;                                                                                 document.body.scrollTop += box.top;                                                                                 box.top = 0;                                                                                 html.style.overflow = &#39;hidden&#39;;                                                                                 document.body.style.overflow = &#39;hidden&#39;;                                                                                 document.body.setAttribute(&#39;scroll&#39;, &#39;no&#39;);                                                                          }                                                                          window.external.refreshAxPos(box.left, box.top, box.right, box.bottom, window.screenLeft, window.screenTop);                                                                          }catch(e){                                                                          }                                                                  },                                                                  enumFlash: function(objArr) {                                                                          for (var i = 0; i < objArr.length; ++i) {                                                                                  if (extPlayer.action.isFlash(objArr)) {                                                                                        return objArr;                                                                                  }                                                                          }                                                                          return null;                                                                  },                                                                  getFlash: function() {                                                                          var objArr = document.getElementsByTagName(&#39;object&#39;);                                                                          var node = extPlayer.action.enumFlash(objArr);                                                                          if (null == node) {                                                                                  var embedArr = document.getElementsByTagName(&#39;embed&#39;);                                                                                  node = extPlayer.action.enumFlash(embedArr);                                                                          }                                                                          return node;                                                                  },                                                                  tryToGo: function() {                                                                          if (&#39;ispop&#39; == window.external.ispop()) {                                                                                  extPlayer.flashAttr.node = extPlayer.action.getFlash();                                                                                  extPlayer.callBacks.go(&#39;noextract&#39;);                                                                          }                                                                  },                                                                  isFlash: function(obj) {                                                                          try {                                                                                  var box = Util.getElementViewRect(obj);                                                                                  var width = box.right - box.left, height = box.bottom - box.top;                                                                                  return width * height >= extPlayer.flashAttr.flashMinS && width * height < extPlayer.flashAttr.flashMaxS &&                                                                                  width <= height * 4 &&                                                                                  (obj.getAttribute(&#39;id&#39;) != &#39;ad_5_crazy_object&#39;);                                                                          } catch (e) {                                                                          }                                                                  },                                                                  stretchAncestors: function(node) {                                                                          try {                                                                                  var parent = node.parentNode;                                                                                  if (document.body == parent || document.body == node) {                                                                                  return;                                                                                  }                                                                                  var cssText = parent.style.cssText;                                                                                  extPlayer.flashAttr.ancesterWHArr.push(cssText);                                                                                  if (&#39;video.sina.com.cn&#39; == location.host){                                                                                          parent.style.position = &#39;absolute&#39;;                                                                                  }                                                                                  parent.style.top = &#39;0px&#39;;                                                                                  parent.style.left = &#39;0px&#39;;                                                                                  parent.style.width = &#39;10000px&#39;;                                                                                  parent.style.height = &#39;120000px&#39;;                                                                                  parent.style.textAlign = &#39;left&#39;;                                                                                  if (parent.nextSibling || parent.previousSibling){                                                                                         parent.style.float = &#39;none&#39;;                                                                                         if (parent.nextSibling){                                                                                                 var node = parent.nextSibling;                                                                                                 while (node){                                                                                                        extPlayer.flashAttr.siblingCssArr.push({display :  node.style ? node.style.display : &#39;&#39;, ele: node});                                                                                                        if (node.style){                                                                                                          node.style.display = &#39;none&#39;;                                                                                                        }                                                                                                        node = node.nextSibling;                                                                                                 }                                                                                         }                                                                                         if (parent.previousSibling){                                                                                                 var node = parent.previousSibling;                                                                                                 while (node){                                                                                                        extPlayer.flashAttr.siblingCssArr.push({display :  node.style ? node.style.display : &#39;&#39;, ele: node});                                                                                                        if (node.style){                                                                                                                node.style.display = &#39;none&#39;;                                                                                                        }                                                                                                        node = node.previousSibling;                                                                                                 }                                                                                         }                                                                                  }                                                                                  extPlayer.action.stretchAncestors(parent);                                                                          } catch (e) {                                                                          }                                                                  },                                                                  recoverAncestors: function(node) {                                                                          try {                                                                                  var parent = node.parentNode;                                                                                  var i = 0;                                                                                  while (document.body != parent) {                                                                                          parent.style.cssText = extPlayer.flashAttr.ancesterWHArr;                                                                                          parent = parent.parentNode;                                                                                          ++i;                                                                                  }                                                                                  for (var i = 0; i < extPlayer.flashAttr.siblingCssArr.length; ++ i){                                                                                          var node = extPlayer.flashAttr.siblingCssArr;                                                                                          if (node.ele.style){                                                                                                  node.ele.style.display = node.display;                                                                                          }                                                                                  }                                                                          } catch (e) {                                                                          }                                                                  }                                                          },                                                          callBacks: {                                                                  mouseoverBtn: function() {                                                                          try {                                                                                  extPlayer.flashAttr.hoverImg.setAttribute("src", &#39;file:///&#39; + extPlayer.flashAttr.picFolder + &#39;alone_hover.png&#39;);                                                                                  extPlayer.flashAttr.btnPlay.style.display = "";                                                                          } catch (e) {                                                                          }                                                                  },                                                                  mouseoutBtn: function() {                                                                        try {                                                                                extPlayer.flashAttr.hoverImg.setAttribute("src", &#39;file:///&#39; + extPlayer.flashAttr.picFolder + &#39;alone_normal.png&#39;);                                                                        } catch (e) {                                                                        }                                                                  },                                                                  mousedownBtn: function() {                                                                          try {                                                                                extPlayer.flashAttr.hoverImg.setAttribute("src", &#39;file:///&#39; + extPlayer.flashAttr.picFolder + &#39;alone_down.png&#39;);                                                                          } catch (e) {                                                                          }                                                                  },                                                                  go: function(extract) {                                                                          try {                                                                                  if (null == extPlayer.flashAttr.node) {                                                                                        extPlayer.flashAttr.node = extPlayer.action.getFlash();                                                                                  }                                                                                  var box = Util.getElementViewRect(extPlayer.flashAttr.node);                                                                                  var html = document.getElementsByTagName(&#39;html&#39;)[0];                                                                                  html.style.overflow = &#39;hidden&#39;;                                                                                  document.body.style.overflow = &#39;hidden&#39;;                                                                                  document.body.setAttribute(&#39;scroll&#39;, &#39;no&#39;);                                                                                  extPlayer.flashAttr.tmpNode.width = box.right - box.left + &#39;px&#39;;                                                                                  extPlayer.flashAttr.tmpNode.height = box.bottom - box.top + &#39;px&#39;;                                                                                  extPlayer.flashAttr.tmpNode.marginLeft = extPlayer.flashAttr.node.style.marginLeft;                                                                                  extPlayer.flashAttr.tmpNode.marginRight = extPlayer.flashAttr.node.style.marginRight;                                                                                  extPlayer.flashAttr.tmpNode.align = extPlayer.flashAttr.node.align;                                                                                  extPlayer.flashAttr.node.style.marginLeft = &#39;0px&#39;;                                                                                  extPlayer.flashAttr.node.style.marginRight = &#39;0px&#39;;                                                                                  extPlayer.flashAttr.node.align = &#39;left&#39;;                                                                                  extPlayer.flashAttr.ancesterWHArr = new Array();                                                                                  extPlayer.flashAttr.siblingCssArr = new Array();                                                                                  if (!(&#39;v.qq.com&#39; == location.host ||                                                                                   &#39;www.4399.com&#39; == location.host ||                                                                                   &#39;v.ifeng.com&#39; == location.host)){                                                                                        extPlayer.action.stretchAncestors(extPlayer.flashAttr.node);                                                                                  }                                                                                  extPlayer.flashAttr.canSetFlashSize = true;                                                                                  extPlayer.flashAttr.refreshAxTimerId = setInterval(extPlayer.action.refreshAxPos, 500);                                                                                   if (&#39;noextract&#39; != extract) {                                                                                        window.external.ExtractFlash(box.left, box.top, box.right, box.bottom);                                                                                  }                                                                                  else {                                                                                        extPlayer.action.refreshAxPos();                                                                                        window.external.refreshFlashTitle();                                                                                        window.external.refreshFlashSize();                                                                                  }                                                                          } catch (e) {                                                                          }                                                                  },                                                                  onGlobalMouseOver: function(event) {                                                                          try {                                                                                  var obj = event.srcElement;                                                                                  var tagname = obj.tagName.toLowerCase();                                                                                  if (&#39;object&#39; == tagname || &#39;embed&#39; == tagname) {                                                                                          if (&#39;notpop&#39; == window.external.ispop()) {                                                                                                  if (extPlayer.action.isFlash(obj)) {                                                                                                          if (null != extPlayer.flashAttr.dissapearTimerId) {                                                                                                                  clearInterval(extPlayer.flashAttr.dissapearTimerId);                                                                                                                  extPlayer.flashAttr.dissapearTimerId = null;                                                                                                          }                                                                                                          var box = Util.getElementViewRect(obj);                                                                                                          var offset = Util.getOffset();                                                                                                          extPlayer.flashAttr.btnPlay.style.left = (box.right + offset.xOffset - 165) + &#39;px&#39;;                                                                                                          if (box.top + offset.yOffset - 29 > 0){                                                                                                                 extPlayer.flashAttr.btnPlay.style.top = (box.top + offset.yOffset - 29) + &#39;px&#39;;                                                                                                          }else{                                                                                                                 extPlayer.flashAttr.btnPlay.style.top = &#39;0px&#39;;                                                                                                          }                                                                                                          extPlayer.flashAttr.btnPlay.style.width = &#39;64px&#39;;                                                                                                          extPlayer.flashAttr.btnPlay.style.height = &#39;29px&#39;;                                                                                                          extPlayer.flashAttr.btnPlay.style.display = &#39;&#39;;                                                                                                          extPlayer.flashAttr.node = obj;                                                                                                  }else{                                                                                                          extPlayer.flashAttr.btnPlay.style.display = &#39;none&#39;;                                                                                                  }                                                                                          }                                                                                  }                                                                          } catch (e) {                                                                          }                                                                  },                                                                  onGlobalMouseOut: function(event) {                                                                          try {                                                                                  var obj = event.srcElement;                                                                                  var tagname = obj.tagName.toLowerCase();                                                                                  if (&#39;object&#39; == tagname || &#39;embed&#39; == tagname) {                                                                                          if (&#39;notpop&#39; == window.external.ispop()) {                                                                                                  extPlayer.flashAttr.dissapearTimerId = setTimeout(function() {                                                                                                         extPlayer.flashAttr.btnPlay.style.display = &#39;none&#39;;                                                                                                  }, 2000);                                                                                          }                                                                                  }                                                                          } catch (e) {                                                                          }                                                                  }                                                          }                                                  };                                                  try{                                                  if (&#39;true&#39; == document.body.contentEditable || &#39;true&#39; == document.body.canEditable || &#39;true&#39; == document.body.contenteditable){                                                  }else{                                                          Util.EventUtil.addHandler(document.body, &#39;mouseover&#39;, extPlayer.callBacks.onGlobalMouseOver);                                                          Util.EventUtil.addHandler(document.body, &#39;mouseout&#39;, extPlayer.callBacks.onGlobalMouseOut);                                                          extPlayer.action.initHover();                                                  }                                                  }catch(e){                                                  }                                          }                                  }                          }                          catch (e) {                          }</SCRIPT>
[QQ@146]   求大神指教
发表于 2013-3-30 13:13:18 | 显示全部楼层

学习学习技术涨涨姿势
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

小黑屋|手机版|Archiver|漂移板网 ( 鲁ICP备2021015450号-3  

GMT+8, 2024-5-22 01:09 , Processed in 0.146004 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc. Design By Singcere!

快速回复 返回顶部 返回列表