posts - 250,  comments - 540,  trackbacks - 8

随笔分类

文章分类

相册

收藏夹

Weblogs

搜索

  •  

最新评论

  • 1. Airline Tickets
  • --Ronald
  • 2. re: 莆田核电站还是要建了
  • 是真的吗?哎,  
  • --莆田人
  • 3. re: 莆田核电站还是要建了
  • 春节在家听大家又说了一些。以前大家挨家挨户筹钱修路,后来好像上面说补给了10W给村里,现在某干部仍然说钱没到。。。
    核电站的事情,赔偿的标准低,而且量地的时候都是缺斤短两,这也是某些干部干的好事。居然隔壁村,人家是村干部顶着,要求这样那样的。
    据说二期我们村也会迁的,到时候大伙还要背土、背井离乡。
  • --dragonimp
  • 4. re: 莆田核电站还是要建了
  • 今年回家看了一下,确如所说,奈何??觉的农村和城市的距离越来越大了,老家人苦啊!!怎样才能发展呢??
  • --wms
  • 5. re: 莆田核电站还是要建了
  • 翁厝村那些村干部有奶就是娘啊,没话可说啊。
  • --hushoushan
  • 6. re: 莆田核电站还是要建了
  • 你是翁厝人?我在你邻村
  • --一个樟木村人
  • 7. re: ProxyRouter入围了
  • 恭喜恭喜~~~
  • --zz
  • 8. re: Tuxedo培训
  • 当是整体复习了一遍,感觉还好。
    有些细节的东西估计老师不懂,没讲清楚。讨论过一次,后来也就不再问了。可能这些面向客户的就那样的了,普及型的。
    也搞了一次形式考试,很简单。(没学过的就得拼命翻书找。。。)
  • --dragonimp
  • 9. re: 游泳~
  • 摸索了这几次的小心得:

    换气:在水下呼气不要太大,其实可以先把肺里的气体呼到嘴里,可以细细挤出一点,出水再一下呼出(要呼干净)再吸入,这样可以避免节奏乱了导致喝水,还可以减少在水里吐气造成的阻力。节奏调整好,会很轻松。
    手臂:可以入水深一点,太靠近水面因为水抱得不多,感觉有劲使不出,多入点水感觉会比较有劲,产生的推力大。
    腿脚:暂时还没去体会,下一个改进的目标,慢慢去感觉

    这样也可能有副作用或不对,不过自己现在感觉这样比原来好就行。
  • --dragonimp
  • 10. re: 找到游泳的地方了~
  • 晚上一个人去了。开始游了几趟热身,然后尝试1000米,留意看了时间,接近40分钟,不过到底是游完了,实现每次翻翻。。。
    开始不到300的时候居然肚子痛,不过为了目标还是咬牙坚持下来。就像跑步那个感觉,过那个点就好了。
    虽然这偷学来的这点能这样算不错了,也可以彻底告别抬头蛙了。。。接着该去再认真纠正错误姿势提高速度了,现在肯定还是离标准很有差距
  • --drqgonimp

/*重新写了一下这个类,把原来几个函数都移了进去,并且加一个setEffect用来设置滤镜和效果!这样就可以从外部编写函数来增强效果了!并且不用再把对象名传递给类了!保留了对原来的兼容,对外只增加一个setEffect,当然还有play和stop。
演示地址:http://impx.net/scripts/tbanner.htm
*/

/*=============================
 Copyright by dragonimp
 All rights reserved.
 
  Description:class for TBanner
 
  version0.1 2004.8.26  first thought to make a class for banner
  version1.0 2004.11.24 simple function to support a banner
  version1.1 2004.12.10 basic effect in class
  version1.2 2005.2.6   setEffect to add other filters and effects
 
  Email:dragonimp@impx.net
  HomePage:http://www.impx.net
==============================
//Usage:(4 steps to run a banner)
 0. First of all, you should include this file in your source.
  1. new TBanner to initialize a new TBanner object
 2. init the base path of images, names of images, and urls for links. first as default;
  3. setEffect to play unique effection. If omitted, it will play with default effection.
 4. start with interval time.

 //example:
 var banner_example=new TBanner();
 banner_example.init("/images/rotate/",new Array("r1.gif","r2.gif","r3.gif"),new Array("url1","url2","url3"));
 //banner_example.setEffect("progid:DXImageTransform.Microsoft.GradientWipe(duration=1.5,gradientSize=0.75,motion=forward)",null)
 //banner_example.setEffect("revealTrans(Duration=2.0,Transition=1)",function(obj){obj.filters[0].Transition = Math.floor(Math.random() * 23);})
 banner_example.start(5000);//millisecond
 
==============================*/


function TBanner()
{
 //create a contianer
 //==================================== 
 this.container=document.createElement("div");
 //document.body.appendChild(this.banner); this cannot work at unstandard env.
 var contianerID="TBannerContainer_"+this.container.uniqueID;
 document.write("<div id='"+contianerID+"'></div>");
 delete this.container;
 this.container=eval(contianerID);
   
 this.image=window.document.createElement("img");
 this.link=window.document.createElement("a");
 
 this.container.appendChild(this.link);
 this.link.appendChild(this.image); 
 //====================================
 
 this.id="banner_"+this.container.uniqueID;
 eval(this.id+"=this");//set the REAL bannerid as this object

 this.container.style.filter="revealTrans(Duration=2.0,Transition=1)";
 this.container.margin=0;
 this.container.padding=0;
 
 this.image.border=0;
 this.image.style.filter=this.container.style.filter;
 this.image.alt=this.id;
 
 this.link.target="_blank"; 
 
 this.index=0;
 this.delaytime=5000;
 this.timer=null;


 //public:

 this.init = function(basepath,images,urls)
 {
  this.imagebasepath=basepath;
  this.images=images;
  this.urls=urls;
  this.PreloadImages(images);
     
  this.switchBanner();//show first banner
 }
 
 this.start = function(delaytime)
 { 
  this.delaytime=(delaytime==null)?this.delaytime:delaytime;
  this.timer=setInterval(this.id+".play()",this.delaytime);
 }
 
 this.stop = function()
 {
  window.clearTimeout(this.timer);
  this.timer=null;
 }
 
 this.setEffect = function(filter,fnSwitch)
 {
  this.container.style.filter=filter;
  this.image.style.filter=filter;
  this.switchEffect=(fnSwitch==null)?function(){}:fnSwitch;
 }
  
 //switch to next banner and play effection
 this.play = function()
 {
  obj=this.image;//this.container doesn't work, why???
  //obj.style.visibility="hidden";
  obj.filters[0].Apply();
  this.switchBanner();
  obj.style.visibility="visible";
  obj.filters[0].Play();  
  
  this.switchEffect(obj);
 };
 
 
 //private:
 
 //default Effect Action
 this.switchEffect = function(obj)
 {
  obj.filters[0].Transition = Math.floor(Math.random() * 23);
 }
  
 //show next banner
 this.switchBanner = function()
 {
  var banner=this;
  if (banner.index<banner.urls.length)//change link
   banner.link.href=banner.urls[banner.index];
  else
  {
   if (banner.urls[0]!=null)
   {
    banner.link.href=banner.urls[0];
    banner.link.title=banner.link.href;
    banner.link.disabled=false;
    banner.link.target="_self";
   }
   else
   {
    banner.link.href="#";
    banner.link.target="_self";
    banner.link.disabled=true;
   }
  }
  banner.image.src=banner.imagebasepath+banner.images[banner.index];

  banner.index++;
  if(banner.index >= banner.images.length)banner.index=0;
 } 

 //Load images before play
 this.PreloadImages = function(images)
 {
  var preloadedimages=new Array()
  for (i=0;i<images.length;i++)
  {
   preloadedimages[i]=new Image()
   preloadedimages[i].src=images[i];
  }
  delete preloadedimages;
 }
}

posted on 2005-02-12 23:28 dragonimp 阅读(2337) 评论(1)  编辑 收藏
标题  
姓名  
主页
内容   
请输入验证码:
*
  登录  使用高级评论  Top 订阅回复  取消订阅
[使用Ctrl+Enter键可以直接提交]