omiga

简单就好

透明PNG@IE6

1条评论»

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

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

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

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

ExternalInterface

发表评论»

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-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)

HTML5

发表评论»

尽管HTML5草案最终定稿要在遥远的2012,而最终的标准的正式发布可能会在更遥远的2022,但是还是可以YY一下,听说safari4已经支持HTML5了~···

HTML5主要在嵌入音频、视频、图片的函数、客户端数据存储,以及交互式文档方面增加了很多新的特性,同时也包括新的页面元素,比如 <header>, <section>, <footer>, 以及 <figure>。

同时HTML5还增加了7个标准属性,而不再支持HTML 4.01 中的accesskey属性。

  • contenteditable 设置是否允许用户编辑元素。
  • contentextmenu 给元素设置一个上下文菜单。
  • draggable 设置是否允许用户拖动元素。
  • irrelevant 设置元素是否相关。不显示非相关的元素。
  • ref 引用另一个文档或本文档上另一个位置。仅在 template 属性设置时使用。
  • registrationmark 为元素设置拍照。可规定于任何 <rule> 元素的后代元素,除了 <nest> 元素。
  • template 引用应该应用到该元素的另一个文档或本文档上另一个位置。

当然,也更新了很多事件属性。

  • onabort 发生 abort 事件时运行脚本。
  • onbeforeonload 在元素加载前运行脚本。
  • oncontextmenu 当菜单被触发时运行脚本。
  • ondrag 只要脚本在被拖动就运行脚本。
  • ondragend  在拖动操作结束时运行脚本。
  • ondragenter 当元素被拖动到一个合法的放置目标时,执行脚本。
  • ondragleave 当元素离开合法的放置目标时。
  • ondragover 只要元素正在合法的放置目标上拖动时,就执行脚本。
  • ondragstart 在拖动操作开始时执行脚本。
  • ondrop 当元素正在被拖动时执行脚本。
  • onerror 当元素加载的过程中出现错误时执行脚本。
  • onmessage 当 message 事件触发时执行脚本。
  • onmousewheel 当鼠标滚轮滚动时执行脚本。
  • onresize 当元素调整大小时运行脚本。
  • onscroll 当元素滚动条被滚动时执行脚本。
  • onunload 当文档卸载时运行脚本。

毕业一年

4条评论»

一年了,真快~···虽然我想写出一个更为惊世骇俗的开场白,但,此时,我只能发出这样平静的感叹!

有些感悟还是不写出来了,大家都自己去感悟吧~···

月初因为户口的事回了趟学校,拍了几张照片,爬了一次山,看了场电影,吃了几顿饭,见了几个人~···

[云麓池,早上七点多阳光就很灿烂了!]

回来这一个星期也主要在忙工作的事情,基本上算是尘埃落定了~···谢谢各位!

PS:太热了~···