flash天气预报

  • 来源: 互联网 作者: 小希   2008-03-18/09:04
  • 用fp7打开,fp8有安全砂箱,演示效果截图如下:

    /*////////////////////////
    /*
    /*
    /* 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();
    };


    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多