<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[Kyomic's Blog]]></title>
  <subtitle type="html"><![CDATA[Programer &amp; Designer - 交互设计之路]]></subtitle>
  <id>http://www.shareme.cn/blog/</id>
  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.shareme.cn/blog/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2011-12-24T14:22:25+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[圣诞快乐]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=7" label="生活" /> 
	  <updated>2011-12-24T14:22:25+08:00</updated>
	  <published>2011-12-24T14:22:25+08:00</published>
		  <summary type="html"><![CDATA[为自己送上一曲，Wh&#101;re I&#39;ve done,&nbsp;&nbsp;同事推荐的，很不错。<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.shareme.cn/blog/images/flash.gif" alt="" style="margin:0px 2px -3px 0px" border="0"/>Flash动画</div><div class="UBBContent"><a id="temp17214_href" href="http://www.shareme.cn/blog/javascript:MediaShow('swf','temp17214','http://www.xiami.com/widget/0_2080958/singlePlayer.swf','257','33')"><img name="temp17214_img" src="http://www.shareme.cn/blog/images/mm_snd.gif" style="margin:0px 3px -2px 0px" border="0" alt=""/><span id="temp17214_text">在线播放</span></a><div id="temp17214"></div></div></div><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=489" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=489</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Hello, Shareme.cn]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=7" label="生活" /> 
	  <updated>2011-11-28T23:32:16+08:00</updated>
	  <published>2011-11-28T23:32:16+08:00</published>
		  <summary type="html"><![CDATA[最近好忙啊，但是公司里很冷清，每周一次散伙饭，但是却不知道大环境的状况如何，真的要关门大吉了么？唉，无所谓了，有得有失。<br/>现在什么压力都堆到我身上，主站Flash播放器研发，数据日志分析，问题根踪。。。。压力好大，白天连和朋友聊个天都没空，对不住啊，真想抽些空来做自己的事，上班真是太没劲了。。。<br/><br/>“几点了，还不睡”<br/>“睡睡睡”]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=488" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=488</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[TweenLite for javascript]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=12" label="JavaScript" /> 
	  <updated>2011-11-28T23:21:49+08:00</updated>
	  <published>2011-11-28T23:21:49+08:00</published>
		  <summary type="html"><![CDATA[使用说明（只支持单个属性变换，还很简陋，使用方式类似<a target="_blank" href="http://wenku.baidu.com/view/d709c9150b4e767f5acfce4d.html" rel="external">TweenLite</a> ）<br/>var onTweenEnd = function(){ alert(&#34;end&#34;)};<br/>//将dom的left变换至100px<br/>TweenLite.to(dom, 0.5, {left:100, onComplete:onTweenEnd });<br/><br/><br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><a onClick="copycode(code17928);" style="float:right;cursor: pointer;font-weight: normal; font-style: normal">复制内容到剪贴板</a><img src="http://www.shareme.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px;" alt="程序代码"/> 程序代码</div><div class="UBBContent" id=code17928><br/>/**<br/>t: current time（当前时间）；<br/>b: beginning value（初始值）；<br/>c: change in value（变化量）；<br/>d: duration（持续时间）。<br/><br/>*/<br/><br/>var TweenLite = new Function();<br/>TweenLite.cache = {};<br/>TweenLite.TIMER_DURATION = 50;<br/>TweenLite.to = function(obj, duration, style )<br/>{<br/>&#160;&#160;&#160;&#160;if(!obj) throw new Error(&#34;*** TweenLite.to arguments error! ***&#34;);<br/><br/>&#160;&#160;&#160;&#160;style = style || {};<br/><br/>&#160;&#160;&#160;&#160;if(!style.ease)<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style.ease = Tween.Linear;<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;var s;<br/>&#160;&#160;&#160;&#160;var v1;<br/>&#160;&#160;&#160;&#160;var v2;<br/>&#160;&#160;&#160;&#160;for(var i in style)<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(i==&#34;ease&#34; || i==&#34;onComplete&#34; || i==&#34;onCompleteParams&#34; || i==&#34;onUp&#100;ate&#34; ||i==&#34;onUp&#100;ateParams&#34; ) continue;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;s = i;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;v2 = style[i];<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;if(!s) throw new Error(&#34;*** Error: arguments error,can&#39;t find attributes ***&#34;);<br/>&#160;&#160;&#160;&#160;var st = DOMUtil.getStyle(obj,s);<br/>&#160;&#160;&#160;&#160;v1 = st ? (st.indexOf(&#34;px&#34;)!=-1? st.split(&#34;px&#34;)[0]:st.indexOf(&#34;px&#34;)):0;<br/>&#160;&#160;&#160;&#160;v1 = parseInt(v1);<br/>&#160;&#160;&#160;&#160;v2 = v2 - v1;<br/>&#160;&#160;&#160;&#160;var cache = TweenLite.cache;<br/>&#160;&#160;&#160;&#160;var c = {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;id: (&#34;000000&#34;+Math.floor(Math.random()*100000)).substr(-6,6),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;target:obj,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c:v2,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;t:0,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;b:v1,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;d:duration*Math.round(1000/TweenLite.TIMER_DURATION),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;att:s,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ease:style.ease<br/>&#160;&#160;&#160;&#160;};&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;c.timerId = Math.random();<br/>&#160;&#160;&#160;&#160;c.handler = function(obj,c, style)<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(c.t&lt;c.d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c.t++;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;val = Math.ceil(c.ease(c.t, c.b, c.c, c.d));<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;obj.style[c.att] = val + &#34;px&#34;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}else{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;TweenLite.kill(obj);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(style.onComplete &amp;&amp; typeof style.onComplete==&#34;function&#34;)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(style.onCompleteParams)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style.onComplete.apply(null, style.onCompleteParams);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}else{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style.onComplete();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;if(cache[obj] &amp;&amp; cache[obj].target == obj)<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;TweenLite.kill(obj);<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;cache[obj] = c;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;c.timerId = setInterval(c.handler, TweenLite.TIMER_DURATION, obj, c, style);<br/><br/>}<br/>TweenLite.kill = function(obj)<br/>{<br/>&#160;&#160;&#160;&#160;var cache = TweenLite.cache;<br/>&#160;&#160;&#160;&#160;if(cache[obj])<br/>&#160;&#160;&#160;&#160;{<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;clearInterval(cache[obj].timerId);<br/>&#160;&#160;&#160;&#160;}<br/>}<br/></div></div><br/>robertpenner的动画库自然不可少<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><a onClick="copycode(code56640);" style="float:right;cursor: pointer;font-weight: normal; font-style: normal">复制内容到剪贴板</a><img src="http://www.shareme.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px;" alt="程序代码"/> 程序代码</div><div class="UBBContent" id=code56640>//author:&#160;&#160;&#160;&#160;cloudgamer<br/>//from:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<a href="http://bbs.blueidea.com/forum.php?mod=viewthread" target="_blank" rel="external">http://bbs.blueidea.com/forum.php?mod=viewthread</a>&amp;tid=2905864<br/>/*<br/>算法来源：<a href="http://www.robertpenner.com/easing/" target="_blank" rel="external">http://www.robertpenner.com/easing/</a><br/>*/<br/>var Tween = {<br/>&#160;&#160;&#160;&#160;Linear: function(t,b,c,d){ return c*t/d + b; },<br/>&#160;&#160;&#160;&#160;Quad: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(t/=d)*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c *(t/=d)*(t-2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c/2 * ((--t)*(t-2) - 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Cubic: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(t/=d)*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*((t=t/d-1)*t*t + 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2*t*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c/2*((t-=2)*t*t + 2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Quart: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(t/=d)*t*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c * ((t=t/d-1)*t*t*t - 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2*t*t*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c/2 * ((t-=2)*t*t*t - 2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Quint: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(t/=d)*t*t*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*((t=t/d-1)*t*t*t*t + 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2*t*t*t*t*t + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c/2*((t-=2)*t*t*t*t + 2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Sine: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c * Math.cos(t/d * (Math.PI/2)) + c + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c * Math.sin(t/d * (Math.PI/2)) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Expo: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t==0) return b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t==d) return b+c;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Circ: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c * Math.sqrt(1 - (t=t/d-1)*t) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Elastic: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d,a,p){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t==0) return b;&nbsp;&nbsp;if ((t/=d)==1) return b+c;&nbsp;&nbsp;if (!p) p=d*.3;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (!a || a &lt; Math.abs(c)) { a=c; var s=p/4; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else var s = p/(2*Math.PI) * Math.asin (c/a);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d,a,p){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t==0) return b;&nbsp;&nbsp;if ((t/=d)==1) return b+c;&nbsp;&nbsp;if (!p) p=d*.3;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (!a || a &lt; Math.abs(c)) { a=c; var s=p/4; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else var s = p/(2*Math.PI) * Math.asin (c/a);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return (a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d,a,p){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t==0) return b;&nbsp;&nbsp;if ((t/=d/2)==2) return b+c;&nbsp;&nbsp;if (!p) p=d*(.3*1.5);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (!a || a &lt; Math.abs(c)) { a=c; var s=p/4; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else var s = p/(2*Math.PI) * Math.asin (c/a);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t &lt; 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Back: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d,s){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (s == undefined) s = 1.70158;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(t/=d)*t*((s+1)*t - s) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d,s){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (s == undefined) s = 1.70158;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d,s){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (s == undefined) s = 1.70158; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d/2) &lt; 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;Bounce: {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeIn: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c - Tween.Bounce.easeOut(d-t, 0, c, d) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ((t/=d) &lt; (1/2.75)) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(7.5625*t*t) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else if (t &lt; (2/2.75)) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else if (t &lt; (2.5/2.75)) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;},<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;easeInOut: function(t,b,c,d){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (t &lt; d/2) return Tween.Bounce.easeIn(t*2, 0, c, d) * .5 + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;else return Tween.Bounce.easeOut(t*2-d, 0, c, d) * .5 + c*.5 + b;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;}<br/>}</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=487" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=487</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[解决Flash在302跨域安全的Bug]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=2" label="FLASH" /> 
	  <updated>2011-10-13T09:48:29+08:00</updated>
	  <published>2011-10-13T09:48:29+08:00</published>
		  <summary type="html"><![CDATA[这个要转一下，好用。<br/><br/><br/>在开发一个Flash图片幻灯片程序的时候遇到当服务器出现302重定向跳转的时候，Flash Player不会自动去加载crossdomain.xml导致出现跨域安全错误，至少在网上查找相关的解决方法，总结消化了一下，可以列出以下几个方法：<br/><br/>1、使用try catch的方式来捕捉到错误，然后分析出错信息，然后强制让Flash Player去加载重定向地址后的crossdomain.xml<br/><br/>示例代码：<br/><br/>var loader:URLLoader = new URLLoader();<br/><br/>loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleComplete);<br/><br/>function handleComplete(e:Event):void<br/><br/>{<br/><br/>try{<br/><br/>var bmp:BitmapData = Bitmap(e.target.content).bitmapData;<br/><br/>} catch (e:Error){<br/><br/>var msg:String = e.msg;<br/><br/>//利用正则表达式匹配<br/><br/>var regExp:RegExp = /\ http\:\/\/([^\/]+)\//g;<br/><br/>if(regExp.test(msg)){<br/><br/>var domain:String = regExp.exec(msg)[0];<br/><br/>Security.loadPolicyFile([domain, &#34;crossdomain.xml&#34;].join(&#34;&#34;));<br/><br/>//do sth.<br/><br/>}<br/><br/>}<br/><br/>}<br/><br/>这种方法是用过匹配Error的出错信息获得302之后的新URL从而加载新的跨域策略文件，给人有点Hack的感觉。<br/><br/>2、这种方法和上面的方法大同小异，但是要更加聪明点同时也具备一定的局限性。<br/><br/>示例代码：<br/><br/>var loader:URLLoader = new URLLoader();<br/><br/>loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleComplete);<br/><br/>function handleComplete(e:Event):void<br/><br/>{<br/><br/>try{<br/><br/>var bmp:BitmapData = Bitmap(e.target.content).bitmapData;<br/><br/>} catch (e:Error){<br/><br/>//通过设置loaderContext来解决问题<br/><br/>var loaderContext:LoaderContext = new LoaderContext(true);<br/><br/>loader.load(new URLRequest(Loader(e.target).contentLoaderInfo.url), loaderContext);<br/><br/>}<br/><br/>}<br/><br/>此方法不需要复杂的匹配就能拿到新的url表面上看起来真的挺好用。<br/><br/>3、具体我都无法解释为何能够解决问题，但是却很好解决了这个问题，但是依旧有点美中不足：<br/><br/>示例代码：<br/><br/>var loader:URLLoader = new URLLoader();<br/><br/>loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleComplete);<br/><br/>//直接设置LoaderContext的AD和SD<br/><br/>var loaderContext:LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain, SecurityDomain.currentDomain);<br/><br/>loader.load(new URLRequest(&#34;<a href="http://yourdomain.com/image.jpg" target="_blank" rel="external">http://yourdomain.com/image.jpg</a>&#34;), loaderContext);<br/><br/>仅仅通过设置ApplicationDomain和SecurityDomain就能解决302的问题，这看起来比起上面提到的两种方法都要简单得多！只是这样很让人费解，如果你读完了AS的帮助文档会感到更加迷茫，上面说过这两个属性只对SWF有意义，对图片是没有意义的...<br/><br/>那么现在我们来分析下3种解决方法的优缺点：<br/><br/>表面上看第一种方法是最差的，需要恶心的正则匹配，而且需要裸露出来的try catch，这意味着至少要加载两次图像资源才能完成整个加载图片的过程。<br/><br/>而第二种方法实际上也要加载两次才能完成加载图片的整个过程。只是少了正则表达式，但是采用此方法还不如直接用第3种方法呢！<br/><br/>第三种方法明显要简单很多（此方法是cbm提供的），甚至可以不用去理解和分析代码，而且不用加载两次，并且解决了Bug。但是实际上却有着局限性，面对 NetStream这一类的加载就一点办法都没有了，因为NetSteam没有提供LoaderContext的设置，这个时候就只能使用我们的第一种方法（包括第二种方法也不能，因为依靠了contentLoaderInfo）。<br/><br/>最后总结3个解决方法中第三种最优但是具备局限性，第一种适用性最广，但是麻烦。而第二种，我们可以放弃不用了！<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=486" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=486</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[对 Server.Cr&#101;ateObject 的调用失败的解决]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=3" label="文章" /> 
	  <updated>2011-08-08T18:02:53+08:00</updated>
	  <published>2011-08-08T18:02:53+08:00</published>
		  <summary type="html"><![CDATA[<p>一个简单的例子，Web从excel中读取内容：</p>
<p>&lt;<a href="http://www.shareme.cn/blog/mailto:%@">%@language=vbscript</a> %&gt;<br />
&lt;%</p>
<p>Set xlApp = server.CreateObject(&quot;Excel.Application&quot;)</p>
<p>strsource = &quot;f:\1dw\cl\汉字库.xls&quot;</p>
<p>Set xlbook = xlApp.Workbooks.Open(strsource)<br />
Set xlsheet = xlbook.Worksheets(1)</p>
<p>i=1<br />
response.write &quot;&lt;table cellpadding=0 cellspacing=0 border=1 width=500&gt;&quot;<br />
while xlsheet.cells(i,1)&lt;&gt;&quot;&quot;</p>
<p>&nbsp;response.write &quot;&lt;tr&gt;&quot;<br />
&nbsp;response.write &quot; &lt;td height=20 align=center width=100&gt;&quot; &amp; xlsheet.Cells(i, 1) &amp; &quot;&lt;/td&gt;&quot;&nbsp;<br />
&nbsp;response.write &quot; &lt;td height=20 align=center width=200&gt;&quot; &amp; xlsheet.Cells(i, 2) &amp; &quot;&lt;/td&gt;&quot;&nbsp;<br />
&nbsp;response.write &quot; &lt;td height=20 align=center width=200&gt;&quot; &amp; xlsheet.Cells(i, 3) &amp; &quot;&lt;/td&gt;&quot;<br />
&nbsp;response.write &quot;&lt;/tr&gt;&quot;<br />
&nbsp;i=i+1</p>
<p>wend<br />
response.write &quot;&lt;/table&gt;&quot;<br />
set xlsheet=nothing<br />
set xlbook=nothing<br />
xlApp.quit</p>
<p>%&gt;</p>
<p>运行，产生错误</p>
<p>错误类型：<br />
Server 对象, ASP 0178 (0x80070005)<br />
检查权限时，对 Server.CreateObject 的调用失败。拒绝对此对象的访问。</p>
<p>参考网上的方法，摸索以下步骤：</p>
<p>管理工具--&gt;组件服务--&gt;计算机--&gt;我的电脑--&gt;DCOM配置</p>
<p>1.选择Microsoft Excel 应用程序 --&gt;属性</p>
<p>标识:选择交互式用户</p>
<p>安全:启动和激活权限--&gt;自定义,加入InterNet来宾帐户,勾上本地启动和本地激活</p>
<p>2.选择Microsoft Office Excel 2007 工作簿 --&gt;属性</p>
<p>常规:身份验证级别&nbsp; --&gt;无</p>
<p>&nbsp;</p>
<p>有人电脑无DCOM配置的属性,解决方法(已验证)</p>
<p>确保下面四个服务是开着的话，那就能确保右键的属性能够出现。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1、Remote Procedure Call (RPC)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2、COM+&nbsp;&nbsp;&nbsp; Event&nbsp;&nbsp;&nbsp; System&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3、DCOM&nbsp;&nbsp;&nbsp; Server&nbsp;&nbsp;&nbsp; Process&nbsp;&nbsp;&nbsp; Launcher&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4、Distributed&nbsp;&nbsp;&nbsp; Transaction&nbsp;&nbsp;&nbsp; Coordinator</p>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后再进入组件服务，就能在DCOM配置中看到右键的属性了，并且组件服务计算机中的&quot;我的电脑&quot;上的那个红色的向下箭头也消失了。</div>
<p>&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Distributed Transaction Coordinator 服务因 3221229584  (0xC0001010) 服务性错误而停止这个错误，主要是系统无法找到MS DTC  日志文件造成的，只要创建一下就可以了：开始－运行－输入命令&quot;msdtc -resetlog&quot;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后再启动该服务就可以了。</p>
<br />
<br />
<p>---------------另一篇</p>
<br />
<p><span style="font-size: 24px;">Server.CreateObject(&quot;Excel.Application&quot;)的权限</span></p>
<div>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td width="250" align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
Set xlApp=Server.CreateObject(&quot;Excel.Application&quot;)%&gt; <br />
执行这句时发生错误如下： <br />
Server 对象, ASP 0178 (0x80070005) <br />
检查权限时，对 Server.CreateObject 的调用失败。拒绝对此对象的访问。</div>
<p>解决办法:<br />
在命令行键入&ldquo;DCOMCNFG&rdquo;，则进入DCOM组件配置界面，选择Microsoft Excel后点击属性按钮，将三个单选项一律选择自定义，编辑中将Everyone加入所有权限。保存完毕后重新启动服务器</p>
<p>&nbsp;</p>
<p>感谢BAIDU。我的IIS能createObject了</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=485" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=485</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Flash NetStream的诡异]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=3" label="文章" /> 
	  <updated>2011-06-24T13:50:21+08:00</updated>
	  <published>2011-06-24T13:50:21+08:00</published>
		  <summary type="html"><![CDATA[FlashPlayer10.3的NetStream好奇怪, 在IE7环境下 , 用它连接一个无法访问的视频, 如 <a href="http://abc.com/a.flv" target="_blank" rel="external">http://abc.com/a.flv</a><br/>竟然会报出以下netstat:<br/>NetStream.Play.StreamNotFound<br/>NetStream.Buffer.Flush<br/>NetStream.Play.Stop<br/><br/>视频不是出错了, 只报 NetStream.Play.StreamNotFound就可以了, 后面两个是从何而来? <br/><br/>1. IE/FF只连接无<a href="http://" target="_blank" rel="external">http://</a>的地址,都正常, 只报 NetStream.Play.StreamNotFound<br/>2. FlashPlayer10.3以下版本都正常<br/>3. FF环境下都正常<br/><br/>这FP10.3又做了什么鬼事,干....<br/>求解!]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=484" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=484</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Flash动态载入字体的问题]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=2" label="FLASH" /> 
	  <updated>2011-06-15T19:03:38+08:00</updated>
	  <published>2011-06-15T19:03:38+08:00</published>
		  <summary type="html"><![CDATA[Flash载入跨域字体时，老是发生注册不了字体，原来是Loader没有设置 LoaderContext的问题<br/><br/>var onFontLoaded = function(e:Event):void{<br/>&nbsp;&nbsp; var loaderInfo:LoaderInfo = e.currentTarget as LoaderInfo;<br/>&nbsp;&nbsp; //font001为font.swf的类名<br/>&nbsp;&nbsp; var cls:Class = loaderInfo.applicationDomain.getDefinition(&#34;font001&#34;);<br/>&nbsp;&nbsp; //如果跨域，这块会报错, cls已经反射出来了..<br/>&nbsp;&nbsp; //ArgumentError: Error #1508: 为参数 font 指定的值无效。<br/>&nbsp;&nbsp; <strong>Font.registerFont(cls);</strong><br/>}<br/>//...so many listener<br/>//loader.load(new URLRequest(&#34;server/font.swf&#34;));<br/><br/>正解：<br/>var _path = &#34;server/font.swf&#34;;<br/>var _localmode = new RegExp(&#34;file://&#34;).test(loaderInfo.url);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>if (_localmode){<br/>&nbsp;&nbsp; _loader.load(new URLRequest(_path));<br/>} else {<br/>&nbsp;&nbsp; var context:LoaderContext = new LoaderContext();<br/>&nbsp;&nbsp; context.checkPolicyFile = true;<br/>&nbsp;&nbsp; context.securityDomain = SecurityDomain.currentDomain;<br/>&nbsp;&nbsp; _loader.load(new URLRequest(_path),context);<br/>}<br/><br/>为什么Player在registerFont进不报 SecurityError呢，让我纠结了很久...<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=483" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=483</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[CSS: 可伸缩的视频]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=12" label="JavaScript" /> 
	  <updated>2011-06-03T01:55:28+08:00</updated>
	  <published>2011-06-03T01:55:28+08:00</published>
		  <summary type="html"><![CDATA[<p>当我在写Elemin主题（一个我最近在<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%E8%AE%BE%E8%AE%A1">设计</span>的WordPress主题）时候，遇到了一个必须面对的问题：我必须要使嵌入的视频可以伸缩。使用max-width:100%和height:auto在<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=HTML5">HTML5</span>的video标签中有效，但是如果嵌入的<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%E4%BB%A3%E7%A0%81">代码</span>中含有iframe或者object标签的话就不行了。经过几小时的试验和Google，我终于成功了。如果你也正在创建一个响应设计，这个简单的CSS技巧会派上用场的。调整一下你的浏览器窗口，看看最后的<a href="http://webdesignerwall.com/demo/elastic-videos/" target="_blank"><font color="#0240a3">demo</font></a>吧。<br />
<a href="http://webdesignerwall.com/demo/elastic-videos/" target="_blank"><br />
<font color="#0240a3">View Demo </font></a><br />
<br />
可伸缩的HTML5视频(<a href="http://webdesignerwall.com/demo/elastic-videos/html5-video.html" target="_blank"><font color="#0240a3">demo</font></a>)<br />
使用HTML5的video元素，在里面添加max-width:100%，在上面的介绍中提到，如果内嵌的代码中有使用到iframe 或者object标签的话，这个技巧就不生效了。</p>
<div class="blockcode">
<div id="code0">
<ol>
    <li>video {<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; max-width: 100%;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; height: auto;<br />
    &nbsp;</li>
    <li>}</li>
</ol>
</div>
<em onclick="copycode($('code0'));">复制代码</em></div>
<p>内嵌iframe 和object标签的可伸缩视频(<a href="http://webdesignerwall.com/demo/elastic-videos/" target="_blank"><font color="#0240a3">demo</font></a>)<br />
这个技巧非常简单。你需要用一个&lt;div&gt;容器把代码包起来，并且把padding-bottom的值设为50%-60%。然后把子元素（内嵌的iframe, object）设为width ：100%, height：100%，position ：bsolute 。这样就可以强行让内嵌的元素的宽度自动最大化了。<br />
CSS</p>
<div class="blockcode">
<div id="code1">
<ol>
    <li>.video-container {<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; position: relative;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; padding-bottom: 56.25%;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; padding-top: 30px;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; height: 0;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; overflow: hidden;<br />
    &nbsp;</li>
    <li>}</li>
</ol>
</div>
<em onclick="copycode($('code1'));">复制代码</em></div>
<div class="blockcode">
<div id="code2">
<ol>
    <li>.video-container iframe,&nbsp;&nbsp;<br />
    &nbsp;</li>
    <li>.video-container object,&nbsp;&nbsp;<br />
    &nbsp;</li>
    <li>.video-container embed {<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; position: absolute;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; top: 0;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; left: 0;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; width: 100%;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; height: 100%;<br />
    &nbsp;</li>
    <li>}</li>
</ol>
</div>
<em onclick="copycode($('code2'));">复制代码</em></div>
<p>HTML</p>
<div class="blockcode">
<div id="code3">
<ol>
    <li>&lt;div class=&quot;video-wrapper&quot;&gt;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;video-container&quot;&gt;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;iframe src=&quot;http://<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=player">player</span>.vimeo.com/video/6284199?title=0&amp;byline=0&amp;portrait=0&quot; width=&quot;800&quot; height=&quot;450&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
    &nbsp;</li>
    <li>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- /video --&gt;<br />
    &nbsp;</li>
    <li>&lt;/div&gt;<br />
    &nbsp;</li>
    <li>&lt;!-- /video-wrapper --&gt;&nbsp; &nbsp; &nbsp; &nbsp;</li>
</ol>
</div>
<em onclick="copycode($('code3'));">复制代码</em></div>
<p>兼容性<br />
这个小技巧在大部分的浏览器上都是可以的（测试过的平台：Chrome, Safari, Firefox, Internet Explorer, Opera, <span class="t_tag" onclick="tagshow(event)" href="tag.php?name=iPhone">iPhone</span> 和 iPad）。</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=482" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=482</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[FlashPlayer debug不能debug.]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=2" label="FLASH" /> 
	  <updated>2011-05-23T13:51:34+08:00</updated>
	  <published>2011-05-23T13:51:34+08:00</published>
		  <summary type="html"><![CDATA[明明装的FlashPlayer debug版，throw new Error(&#34;&#34;)竟然不在Player里出错误框<br/>前几周同事的电脑出现问题，如今我的电脑也被感染了？<br/><br/>解决方案：<br/>1.在以下文件夹找到mm.cfg 文件<br/>OS X: /Library/Application Support/<a href="http://www.macromedia.com/cn/" target="_blank"><img src="http://www.shareme.cn/blog/images/keywords/macromedia.gif" border="0" alt=""/> Macromedia</a><br/>Win XP: C:\Documents and Settings\username<br/>Win Vista: C:\Users\username<br/>Linux: /home/username<br/>2.用记事本打开，将SuppressDebuggerExceptionDialogs的值改为0，改为1就不能debug了<br/><br/>参见文章：<a target="_blank" href="http://yoavgivati.com/2009/09/disable-flash-debugger-error-messages/" rel="external">http://yoavgivati.com/2009/09/disable-flash-debugger-error-messages/</a>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=481" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=481</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Http请求状态码的含义]]></title>
	  <author>
		 <name>admin</name>
		 <uri>http://www.shareme.cn/blog/</uri>
		 <email>kyomic@163.com</email>
	  </author>
	  <category term="" scheme="http://www.shareme.cn/blog/default.asp?cateID=3" label="文章" /> 
	  <updated>2011-05-20T00:26:05+08:00</updated>
	  <published>2011-05-20T00:26:05+08:00</published>
		  <summary type="html"><![CDATA[xmlHttp.status的值（HTTP状态表）<br/>0**：未被始化 <br/>1**：请求收到，继续处理 <br/>2**：操作成功收到，分析、接受 <br/>3**：完成此请求必须进一步处理 <br/>4**：请求包含一个错误语法或不能完成 <br/>5**：服务器执行一个完全有效请求失败 <br/><br/>100——客户必须继续发出请求 <br/>101——客户要求服务器根据请求转换HTTP协议版本 <br/><br/>200——交易成功 <br/>201——提示知道新文件的URL <br/>202——接受和处理、但处理未完成 <br/>203——返回信息不确定或不完整 <br/>204——请求收到，但返回信息为空 <br/>205——服务器完成了请求，用户代理必须复位当前已经浏览过的文件 <br/>206——服务器已经完成了部分用户的GET请求 <br/><br/>300——请求的资源可在多处得到 <br/>301——删除请求数据 <br/>302——在其他地址发现了请求数据 <br/>303——建议客户访问其他URL或访问方式 <br/>304——客户端已经执行了GET，但文件未变化 <br/>305——请求的资源必须从服务器指定的地址得到 <br/>306——前一版本HTTP中使用的代码，现行版本中不再使用 <br/>307——申明请求的资源临时性删除 <br/><br/>400——错误请求，如语法错误 <br/>401——请求授权失败 <br/>402——保留有效ChargeTo头响应 <br/>403——请求不允许 <br/>404——没有发现文件、查询或URl <br/>405——用户在Request-Line字段定义的方法不允许 <br/>406——根据用户发送的Accept拖，请求资源不可访问 <br/>407——类似401，用户必须首先在代理服务器上得到授权 <br/>408——客户端没有在用户指定的饿时间内完成请求 <br/>409——对当前资源状态，请求不能完成 <br/>410——服务器上不再有此资源且无进一步的参考地址 <br/>411——服务器拒绝用户定义的Content-Length属性请求 <br/>412——一个或多个请求头字段在当前请求中错误 <br/>413——请求的资源大于服务器允许的大小 <br/>414——请求的资源URL长于服务器允许的长度 <br/>415——请求资源不支持请求项目格式 <br/>416——请求中包含Range请求头字段，在当前请求资源范围内没有range指示值，请求也不包含If-Range请求头字段 <br/>417——服务器不满足请求Expect头字段指定的期望值，如果是代理服务器，可能是下一级服务器不能满足请求 <br/><br/>500——服务器产生内部错误 <br/>501——服务器不支持请求的函数 <br/>502——服务器暂时不可用，有时是为了防止发生系统过载 <br/>503——服务器过载或暂停维修 <br/>504——关口过载，服务器使用另一个关口或服务来响应用户，等待时间设定值较长 <br/>505——服务器不支持或拒绝支请求头中指定的HTTP版本<br/><br/>1xx:信息响应类，表示接收到请求并且继续处理 <br/>2xx:处理成功响应类，表示动作被成功接收、理解和接受 <br/>3xx:重定向响应类，为了完成指定的动作，必须接受进一步处理 <br/>4xx:客户端错误，客户请求包含语法错误或者是不能正确执行 <br/>5xx:服务端错误，服务器不能正确执行一个正确的请求<br/><br/>以后总会用到的....]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.shareme.cn/blog/article.asp?id=480" /> 
	  <id>http://www.shareme.cn/blog/default.asp?id=480</id>
  </entry>	
		
</feed>

