博客回档了

2009-07-31 18:14

中午博客被我大折腾了一番。相当长一段时间博客侧栏的评论无法显示,我以为是因为升级的问题。同时这段时间居然没有任何评论,包括垃圾评论,以前每天都有上百条垃圾评论~···后来才发现,原来评论无法发表。提示找不到某个文件~,而这个文件是本来就没有的。重新替换评论相关页面,依然不行~···

打开配置文件,发现密码被神奇地修改了~···没法,删除原来的数据库,重新建了数据库设置了密码~···导入备份~···

可惜,备份在博客出问题后就出问题了,博客备份在7月12号后就挂掉了~···在这之后我更新了两篇文章自然而然地就没有备份下来~···幸好还有google reader~···12号后发表的两篇文章已经恢复了~···

至于原因,由于我最近太忙,无暇顾及~···服务器那边也查不到了~···如果是哪位黑客或者白客朋友所为,我想说你还真是闲的蛋疼!

透明PNG@IE6

2009-07-28 17:22

IE7,8,都支持PNG-24的透明PNG,IE6是不行的,前人们总结的方法也是一大堆,基本上都是使用IE的滤镜实现。使用滤镜的时候,IE6里面问题非常多。以前就发现过一次,外层使用透明滤镜后,内层的伪类会失效,今天居然发现,连表单也失效了~···

在网上翻了一圈,发现一个牛人用VML来实现的方法,非常拉风~···

看这里:http://www.dillerdesign.com/experiment/DD_belatedPNG/

具体使用方法,看下作者的使用文档。

ExternalInterface

2009-07-23 17:16

ExternalInterface是一个外部的用于实现Actionscript和Flash Player容器之间通信的应用程序接口(诸如AS与JS的通信)。推荐对所有 JavaScript 与 ActionScript 之间的通信使用 ExternalInterface,替代较旧的fscommand(),getURL()方法。

ExternalInterface类有两个公共属性:

  1. available : Boolean [static][read-only] 指示此播放器是否位于提供外部接口的容器中。
  2. objectID : String [static][read-only] 在 Internet Explorer 中,返回标签的 id 属性;在 Netscape 中,返回 name 属性。

同时具有两个公共方法:

  1. addCallback(functionName:String, closure:Function):void [static] 将 ActionScript 方法注册为可从容器调用。
  2. call(functionName:String, … arguments):* [static] 调用由 Flash Player 容器公开的函数,不传递参数或传递多个参数。

ActionScript调用JavaScript demo

AS:

import flash.events.MouseEvent;
import flash.external.ExternalInterface;
bt.addEventListener(MouseEvent.MOUSE_UP,alert);
function alert(e:MouseEvent):void{
 ExternalInterface.call("alert","a demo for call \n http://omiga.org");
}

直接调用即可,当然,最好检查一下当前容器是否支持外部接口通信。

bt.addEventListener(MouseEvent.MOUSE_UP,alert);
function alert(e:MouseEvent):void{
 if(ExternalInterface.available){
 ExternalInterface.call("alert","a demo for call \n http://omiga.org");
 }
}

JavaScript调用ActionScript demo

AS:

import flash.external.ExternalInterface;
function setText(s){
 i_txt.text = s;
}
ExternalInterface.addCallback("setText",setText);

HTML:

<object id="mySWF"  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="22">
 <param name="movie" value="addCallback.swf" />
 <param name="quality" value="high" />
 <param name="allowScriptAccess" value="always" />
 <embed src="addCallback.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="22"></embed>
</object>
<button onclick="set()">设 置</button>
<script type="text/javascript">
function getFlash(id){
 if(document.all) return document.getElementById(id);
 else return document.getElementById(id).getElementsByTagName("embed")[0];
}
function set(){
 var s = prompt('请输入:');
 getFlash("mySWF").setText(s);
}
</script>

XHTML 2 Working Group Expected to Stop Work End of 2009, W3C to Increase Resources on HTML 5

2009-07-03 09:38

2009-07-02: Today the Director announces that when the XHTML 2 Working Group charter expires as scheduled at the end of 2009, the charter will not be renewed. By doing so, and by increasing resources in the Working Group, W3C hopes to accelerate the progress of HTML 5 and clarify W3C’s position regarding the future of HTML. A FAQ answers questions about the future of deliverables of the XHTML 2 Working Group, and the status of various discussions related to HTML. Learn more about the HTML Activity. (Permalink)