{"id":293,"date":"2011-10-29T13:53:20","date_gmt":"2011-10-29T05:53:20","guid":{"rendered":"http:\/\/www.woria.cn\/blogs\/?p=293"},"modified":"2011-10-29T13:53:20","modified_gmt":"2011-10-29T05:53:20","slug":"flash-as3-yahoo-weather-api-zh-cn","status":"publish","type":"post","link":"https:\/\/blogs.woria.cn\/?p=293","title":{"rendered":"Flash as3 yahoo\u5929\u6c14API \u4e2d\u82f1\u6587\u5bf9\u7167"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u7814\u7a76yahoo\u7684\u5929\u6c14api\u3002<br \/>\n\u633a\u597d\u7528\u7684\uff0c\u4e0d\u8fc7\u8fd4\u56de\u6570\u636e\u90fd\u662f\u82f1\u6587\u3002\u7f51\u4e0a\u627e\u4e86\u4e2d\u82f1\u6587\u5bf9\u7167\u3002\u7a0d\u540e\u653e\u8be6\u7ec6\u5f00\u53d1\u6559\u7a0b\u3002<br \/>\n\u6e90\u7801\u653e\u51fa\u3002\u5728\u5f00\u53d1\u4e2d\u6709\u51e0\u4e2a\u95ee\u9898\u8fd9\u91cc\u91cd\u70b9\u63d0\u4e00\u4e0b\u3002<br \/>\n\u7b2c\u4e00 \u5173\u4e8e\u6570\u5b57\u663e\u793a\u3002\u6bd4\u59829\u70b9 \u4ece\u7f8e\u89c2\u4e0a\u8003\u8651\u9700\u8981 \u52a0\u4e0a0 \u663e\u793a\u4e3a 09:01\u5206\u3002\u8fd9\u6837\u4f1a\u597d\u770b\u3002\u5219\u9700\u8981\u5bf9\u6bd4\u7cfb\u7edf\u65f6\u95f4 \u5f53\u5c0f\u4e8e10\u7684\u65f6\u5019String \u7136\u540e\u524d\u8fb9\u52a0\u4e0a0.\u6708\u4efd\u548c\u65e5\u671f\u505a\u76f8\u540c\u5904\u7406\u3002<br \/>\n\u5f53flash\u52a0\u8f7dyahoo\u7684\u56fe\u7247\u65f6\u5019\u3002\u8de8\u9884\u52a0\u8f7d\u6709\u65f6\u5019\u672c\u5730\u4f1a\u4e0d\u73b0\u5b9e\u3002\u5728loader\u4e2d\u6dfb\u52a0\u4e00\u4e2aLoaderContext \u5373\u53ef\u3002<br \/>\n\u5982\u4e0b\uff1a<br \/>\nvar isr:String = o.imageURL;<br \/>\n\/\/trace(isr);<br \/>\nvar iid:Array = isr.match(\/[0-9].\/g);<br \/>\nvar lo:Loader=new Loader();<br \/>\nvar lc:LoaderContext = new LoaderContext(true);<br \/>\nlo.load(new URLRequest(&#8220;http:\/\/l.yimg.com\/a\/i\/us\/nws\/weather\/gr\/&#8221;+iid[1]+&#8221;d.png&#8221;),lc);<br \/>\nlo.contentLoaderInfo.addEventListener(Event.COMPLETE,showit);<\/p>\n<p>\u9700\u8981\u8bf4\u660e\u7684\u662f yahoo\u8fd4\u56de\u7684\u6570\u636e\u4e2d\u9ed8\u8ba4\u7684\u56fe\u7247\u662f\u4e00\u79cd\u5f88\u5c0f\u7684gif\u3002<br \/>\n\u5982\u56fe\uff1a<br \/>\n<figure style=\"width: 52px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u56fe\u793a\u610f\" src=\"http:\/\/l.yimg.com\/a\/i\/us\/we\/52\/30.gif\" title=\"\u5c0f\u56fe\u793a\u610f\" width=\"52\" height=\"52\" \/><figcaption class=\"wp-caption-text\">\u5c0f\u56fe\u793a\u610f<\/figcaption><\/figure><br \/>\n\u6211\u4e2a\u4eba\u559c\u6b22\u52a0\u8f7d\u90a3\u4e2a\u5927png\u900f\u660e\u56fe\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\u5927\u56fe\u793a\u610f\" src=\"http:\/\/l.yimg.com\/a\/i\/us\/nws\/weather\/gr\/30d.png\" title=\"\u5927\u56fe\u793a\u610f\" class=\"alignnone\" width=\"250\" height=\"180\" \/><br \/>\n\u901a\u8fc7\u6b63\u5219\u83b7\u5f97\u63a5\u53e3\u8fd4\u56de\u7684\u56fe\u7247\u7f16\u53f7\uff0c\u7136\u540e\u52a0\u8f7d\u5bf9\u5e94\u7684png\u3002<br \/>\n\u6ce8\u610f\u4e0a\u8fb9\u90a3\u4e2a\u8303\u4f8b\u5c31\u662f\u5982\u6b64\u5904\u7406\u7684\u3002<\/p>\n<p><!--more--><br \/>\nhan = new Array();<br \/>\nhan.push( { label:&#8217;AM Clouds \/ PM Sun&#8217;,name:&#8217;\u4e0a\u5348\u6709\u4e91\/\u4e0b\u5348\u540e\u6674 &#8216; } );<br \/>\nhan.push( { label:&#8217;AM Showers&#8217;,name:&#8217;\u4e0a\u5348\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;AM Snow Showers&#8217;,name:&#8217;\u4e0a\u5348\u9635\u96ea&#8217; } );<br \/>\nhan.push( { label:&#8217;AM Thunderstorms&#8217;,name:&#8217;\u4e0a\u5348\u96f7\u66b4\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Clear&#8217;,name:&#8217;\u6674\u6717 &#8216; } );<br \/>\nhan.push( { label:&#8217;Cloudy&#8217;,name:&#8217;\u591a\u4e91 &#8216; } );<br \/>\nhan.push( { label:&#8217;Cloudy \/ Wind&#8217;,name:&#8217;\u9634\u65f6\u6709\u98ce&#8217; } );<br \/>\nhan.push( { label:&#8217;Clouds Early \/ Clearing Late&#8217;,name:&#8217;\u65e9\u591a\u4e91\/\u665a\u8f6c\u6674&#8217; } );<br \/>\nhan.push( { label:&#8217;Drifting Snow&#8217;,name:&#8217;\u98d8\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Drizzle&#8217;,name:&#8217;\u6bdb\u6bdb\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Dust&#8217;,name:&#8217;\u7070\u5c18 &#8216; } );<br \/>\nhan.push( { label:&#8217;Fair&#8217;,name:&#8217;\u6674 &#8216; } );<br \/>\nhan.push( { label:&#8217;Few Showers&#8217;,name:&#8217;\u77ed\u6682\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Few Snow Showers&#8217;,name:&#8217;\u77ed\u6682\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Few Snow Showers \/ Wind&#8217;,name:&#8217;\u77ed\u6682\u9635\u96ea\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Fog&#8217;,name:&#8217;\u96fe &#8216; } );<br \/>\nhan.push( { label:&#8217;Haze&#8217;,name:&#8217;\u8584\u96fe &#8216; } );<br \/>\nhan.push( { label:&#8217;Hail&#8217;,name:&#8217;\u51b0\u96f9 &#8216; } );<br \/>\nhan.push( { label:&#8217;Heavy Rain&#8217;,name:&#8217;\u5927\u96e8&#8217; } );<br \/>\nhan.push( { label:&#8217;Heavy Rain Icy&#8217;,name:&#8217;\u5927\u51b0\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Heavy Snow&#8217;,name:&#8217;\u5927\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Heavy Thunderstorms&#8217;,name:&#8217;\u5f3a\u70c8\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Isolated Thunderstorms&#8217;,name:&#8217;\u5c40\u90e8\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Drizzle&#8217;,name:&#8217;\u5fae\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Rain&#8217;,name:&#8217;\u5c0f\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Rain Shower&#8217;,name:&#8217;\u5c0f\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Rain Shower and Windy&#8217;,name:&#8217;\u5c0f\u9635\u96e8\u5e26\u98ce&#8217; } );<br \/>\nhan.push( { label:&#8217;Light Rain with Thunder&#8217;,name:&#8217;\u5c0f\u96e8\u6709\u96f7\u58f0 &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Snow&#8217;,name:&#8217;\u5c0f\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Snow Fall&#8217;,name:&#8217;\u5c0f\u964d\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Snow Grains&#8217;,name:&#8217;\u5c0f\u7c92\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Light Snow Shower&#8217;,name:&#8217;\u5c0f\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Lightening&#8217;,name:&#8217;\u96f7\u7535 &#8216; } );<br \/>\nhan.push( { label:&#8217;Mist&#8217;,name:&#8217;\u8584\u96fe &#8216; } );<br \/>\nhan.push( { label:&#8217;Mostly Clear&#8217;,name:&#8217;\u5927\u90e8\u6674\u6717 &#8216; } );<br \/>\nhan.push( { label:&#8217;Mostly Cloudy&#8217;,name:&#8217;\u5927\u90e8\u591a\u4e91 &#8216; } );<br \/>\nhan.push( { label:&#8217;Mostly Cloudy\/ Windy&#8217;,name:&#8217;\u591a\u4e91\u65f6\u9634\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Mostly Sunny&#8217;,name:&#8217;\u6674\u65f6\u591a\u4e91 &#8216; } );<br \/>\nhan.push( { label:&#8217;Partly Cloudy&#8217;,name:&#8217;\u5c40\u90e8\u591a\u4e91 &#8216; } );<br \/>\nhan.push( { label:&#8217;Partly Cloudy\/ Windy&#8217;,name:&#8217;\u591a\u4e91\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;PM Rain \/ Wind&#8217;,name:&#8217;\u4e0b\u5348\u5c0f\u96e8\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;PM Light Rain&#8217;,name:&#8217;\u4e0b\u5348\u5c0f\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;PM Showers&#8217;,name:&#8217;\u4e0b\u5348\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;PM Snow Showers&#8217;,name:&#8217;\u4e0b\u5348\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;PM Thunderstorms&#8217;,name:&#8217;\u4e0b\u5348\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain&#8217;,name:&#8217;\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain Shower&#8217;,name:&#8217;\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain Shower\/ Windy&#8217;,name:&#8217;\u9635\u96e8\/\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain \/ Snow Showers&#8217;,name:&#8217;\u96e8\u6216\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain \/ Snow Showers Early&#8217;,name:&#8217;\u4e0b\u96e8\/\u65e9\u95f4\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain \/ Wind&#8217;,name:&#8217;\u96e8\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Rain and Snow&#8217;,name:&#8217;\u96e8\u5939\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Showers&#8217;,name:&#8217;\u96f6\u661f\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Showers \/ Wind&#8217;,name:&#8217;\u96f6\u661f\u9635\u96e8\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Snow Showers&#8217;,name:&#8217;\u96f6\u661f\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Snow Showers \/ Wind&#8217;,name:&#8217;\u96f6\u661f\u9635\u96ea\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Strong Storms&#8217;,name:&#8217;\u96f6\u661f\u5f3a\u70c8\u66b4\u98ce\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Scattered Thunderstorms&#8217;,name:&#8217;\u96f6\u661f\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Showers&#8217;,name:&#8217;\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Showers Early&#8217;,name:&#8217;\u65e9\u6709\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Showers Late&#8217;,name:&#8217;\u665a\u6709\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Showers \/ Wind&#8217;,name:&#8217;\u9635\u96e8\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Showers in the Vicinity&#8217;,name:&#8217;\u5468\u56f4\u6709\u9635\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Smoke&#8217;,name:&#8217;\u70df\u96fe &#8216; } );<br \/>\nhan.push( { label:&#8217;Snow&#8217;,name:&#8217;\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Snow \/ Rain Icy Mix&#8217;,name:&#8217;\u51b0\u96e8\u5939\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Snow and Fog&#8217;,name:&#8217;\u96fe\u5939\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Snow Shower&#8217;,name:&#8217;\u9635\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Snowflakes&#8217;,name:&#8217;\u96ea\u82b1 &#8216; } );<br \/>\nhan.push( { label:&#8217;Sunny&#8217;,name:&#8217;\u6674\u6717 &#8216; } );<br \/>\nhan.push( { label:&#8217;Sunny \/ Wind&#8217;,name:&#8217;\u6674\u65f6\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Sunny Day&#8217;,name:&#8217;\u6674\u5929 &#8216; } );<br \/>\nhan.push( { label:&#8217;Thunder&#8217;,name:&#8217;\u96f7\u9e23 &#8216; } );<br \/>\nhan.push( { label:&#8217;Thunder in the Vicinity&#8217;,name:&#8217;\u5468\u56f4\u6709\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Thunderstorms&#8217;,name:&#8217;\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Thunderstorms Early&#8217;,name:&#8217;\u65e9\u6709\u6301\u7eed\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Thunderstorms Late&#8217;,name:&#8217;\u665a\u6709\u6301\u7eed\u96f7\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Windy&#8217;,name:&#8217;\u6709\u98ce &#8216; } );<br \/>\nhan.push( { label:&#8217;Windy \/ Snowy&#8217;,name:&#8217;\u6709\u98ce\/\u6709\u96ea &#8216; } );<br \/>\nhan.push( { label:&#8217;Windy Rain&#8217;, name:&#8217;\u522e\u98ce\u4e0b\u96e8 &#8216; } );<br \/>\nhan.push( { label:&#8217;Wintry Mix&#8217;, name:&#8217;\u96e8\u96ea\u6df7\u5408&#8217; } );<\/p>\n<p><a href='http:\/\/www.woria.cn\/blogs\/wp-content\/uploads\/2011\/10\/weather.swf'>weather\u6f14\u793a<\/a><br \/>\n<a href='http:\/\/blogs.woria.cn\/wp-content\/uploads\/2011\/10\/weather.zip'>weather\u6e90\u7801<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u7814\u7a76yahoo\u7684\u5929\u6c14api\u3002 \u633a\u597d\u7528\u7684\uff0c\u4e0d\u8fc7\u8fd4\u56de\u6570\u636e\u90fd\u662f\u82f1\u6587\u3002\u7f51\u4e0a\u627e\u4e86\u4e2d\u82f1\u6587\u5bf9\u7167\u3002\u7a0d\u540e\u653e\u8be6\u7ec6\u5f00\u53d1\u6559\u7a0b\u3002 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,9,5],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-technique","category-programmer","category-magician"],"_links":{"self":[{"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293"}],"version-history":[{"count":0,"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.woria.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}