flash天气预告的制作方法

2008-04-02 10:33:59来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


  

  

  

  

  


  


  /*////////////////////////

  /*

  /*

  /* by yellow

  /* yellowboydesign@gmail.com

  /* http://yellowboy.cn

  /*

  */

  ///////////////////////

  stop();

  System.useCodepage = true;

  fpv_cn = new LoadVars();

  fpv_cn.load("http://www.tq121.com.cn/forecast/cf.php");

  fpv_cn_weather = new Array();

  tempcity = new Array();

  tempw = new Array();

  temphot = new Array();

  tempwind = new Array();

  tempwinds = new Array();

  fpv_cn_out = "

  ";

  fpv_cn_city = "城市:";

  fpv_cn_w = "天气:";

  fpv_cn_hot = "温度:";

  fpv_cn_wind = "风向:";

  fpv_cn_winds = "风力:";

  fpv_cn.onData = function(data) {

  fpv_cn_str = new String(data);

  for (i=7500; i
  if (fpv_cn_str.slice(i, i fpv_cn_city.length) == fpv_cn_city) {

  for (j=i; jif (fpv_cn_str.slice(j, j fpv_cn_out.length) == fpv_cn_out) {

  tempcity.push(fpv_cn_str.slice(i fpv_cn_city.length, j-1));

  break;

  }

  }

  }

  //天气

  if (fpv_cn_str.slice(i, i fpv_cn_w.length) == fpv_cn_w) {

  for (k=i; kif (fpv_cn_str.slice(k, k fpv_cn_out.length) == fpv_cn_out) {

  tempw.push(fpv_cn_str.slice(i fpv_cn_w.length, k));

  break;

  }

  }

  }

  //温度

  if (fpv_cn_str.slice(i, i fpv_cn_hot.length) == fpv_cn_hot) {

  for (l=i; lif (fpv_cn_str.slice(l, l fpv_cn_out.length) == fpv_cn_out) {

  temphot.push(fpv_cn_str.slice(i fpv_cn_hot.length, l));

  break;

  }

  }

  }

  //风向

  if (fpv_cn_str.slice(i, i fpv_cn_wind.length) == fpv_cn_wind) {

  for (m=i; mif (fpv_cn_str.slice(m, m fpv_cn_out.length) == fpv_cn_out) {

  tempwind.push(fpv_cn_str.slice(i fpv_cn_wind.length, m));

  break;

  }

  }

  }

  //风力

  if (fpv_cn_str.slice(i, i fpv_cn_winds.length) == fpv_cn_winds) {

  for (n=i; nif (fpv_cn_str.slice(n, n fpv_cn_out.length) == fpv_cn_out) {

  tempwinds.push(fpv_cn_str.slice(i fpv_cn_winds.length, n));

  break;

  }

  }

  }

  }

  //放进数组

  //city:城市,w:天气,hot:温度,wind:风向,winds:风力

  for (o=0; ofpv_cn_weather.push({city:tempcity[o], w:tempw[o], hot:temphot[o], wind:tempwind[o], winds:tempwinds[o]});

  }

  //排序

  fpv_cn_weather.sortOn("city");

  play();

  };

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: 原Blueidea首页调查完全解析

下一篇: flash投票程式[ASPXML版]