WEB开发网
开发学院图形图像Flash Embed Flash Yahoo Weather in your page with Ya... 阅读

Embed Flash Yahoo Weather in your page with Yahoo APIs

 2009-10-20 00:00:00 来源:WEB开发网   
核心提示:本文源代码下载地址: http://flashview.ddvip.com/2009_10/weather.zipIf you have a touristic website about a city or a travel agency, it may be useful displaying the weathe

本文源代码下载地址: http://flashview.ddvip.com/2009_10/weather.zip

If you have a touristic website about a city or a travel agency, it may be useful displaying the weather somewhere in the page.

There are hundreds of free services solving the task, but none of them comes without watermark, is fully customizable and has a dedicated AS3 API like Yahoo’s one.

Let’s see how to embed it in a Flash movie.

Prepare your folder

Once you unzipped the file, copy the com directory inside the Source one in the main folder, the same you are using for your project, or create your project in the Source folder.

If you choose to copy the com directory, your folder will look like this:

Embed Flash Yahoo Weather in your page with Yahoo APIs

The script

First, you need to retrieve your location code. Go to this page and search for the weather in your city. Then, look at the url of the page… in my case, looking for Venice, Italy, it’s this one:

http://weather.yahoo.com/forecast/ITXX0085.html

That means the city code for Venice is ITXX0085.

Now it’s time to look at the script:

1 2 3 4  下一页

Tags:Embed Flash Yahoo

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接