Teilen |

How to load my landscape in YoWindow weather widget?

Weather in Washington, day

Berlin weather Deutsch
  1. Make sure you can open the landscape in YoWindow.

  2. Upload the landscape folder to your web-server.

    Upload your files carefully to avoid errors.

    WARNING: make sure that image file(s) are transferred in binary FTP mode.

    WARNING: file names are case sensitive on the server usually.
    If the image is referred in .ywl file as LondoN.PNG, make sure its file name is LondoN.PNG, but NOT LONDON.PNG or london.png.
    Otherwise the image will not be found by YoWindow widget.

  3. Put a special crossdomain.xml file in your server ROOT directory.
    crossdomain.xml is used on the web to allow outside web-servers to connect to your server. You need this file to open an access to yowindow.com web-server, to let the widget load your landscape.

    This is the most simple crossdomain.xml file required to open an access for yowindow.com.

    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="*" secure="true"/>
    </cross-domain-policy>


    To download this file you have to click with right mouse button on the following link and choose "Save Target As".
    Only this way, otherwise you may occasionally save the file in a wrong format.
    crossdomain.xml.

    WARNING: YoWindow will NOT be able to load your landscape if crossdomain.xml is missing or wrong.

    YoWindow weather widget is a Flash application.
    For security reasons Flash can download data from another server only if the server has a special crossdomain.xml file placed in the root directory.
    You may read this Adobe article on the subject if you want to know the technical details.
    http://kb2.adobe.com/cps/142/tn_14213.html


    Put crossdomain.xml in the root directory on your server.
    ROOT directory ONLY, NOT any other one.
    For example, http://microsoft.com/crossdomain.xml

  4. Modify your widget HTML code.
    Set "landscape" variable to the URL of your landscape.ywl file on your server.

    Example:
    <param name="flashvars"
    value="location_id=360630&amp;landscape=http://myserver.com/landscapes/london/london.ywl"/>
    By the way, you may display landscapes from any URL on the Internet.
    If you like, you may test one of our landscapes in your widget, set "landscape" variable to this URL. http://landscape.yowindow.com/landscapes/colosseum/colosseum.ywl

    By this time you should have the widget up and running.
    However, most visitors of your page will have to wait up to to a minute for the landscape to load.Because the landscape file is very large.
    Please follow the last section of this tutorial to solve this problem and make your widget perfect!



Shrink PNG image file size 10 times!

The size of Landscape Image PNG file is 1 - 2 Megabytes in average.
Most users of your site will have to wait for 20 - 60 seconds for the image to load.
You can measure the time by cleaning your browser cache and reloading the page.

To reduce the time you have two options.

  1. Resize the PNG image.
    Make it smaller. If the widget is small who cares about the big picture?
    However, opening the widget in Full Screen will disappoint the user.

  2. Compress PNG image 10 times.
    You can compress PNG image very effectively by converting it to SWF (Flash) file.
    This works like JPEG compression, but the result file is in SWF format.
    Why SWF but not JPEG?
    Because JPEG files cannot keep information about transparency (removed sky).
    SWF files can.

    We have made a special service for you to turn PNG into SWF.
    When you are done, come back.

    Convert PNG to SWF

    Save the output SWF file and follow these steps.

    1. Put the SWF file in the same folder where your PNG image is kept.

    2. Update YWL file accordingly - replace PNG image with SWF file reference.
    Example:
    was: <data src="img/colosseum.png" horizonLevel="735">
    new: <data src="img/colosseum.swf" horizonLevel="735">

    3. Upload SWF and YWL files on your web-serer.

    4. Clean the browser cache.

    You will be surprised how fast your landscape is loaded now.

    As a result you have a big landscape picture that looks good in full-screen and is loaded very fast at the same time.

    Weather in Washington, day


    WARNING: Unfortunately, SWF files cannot be opened inside YoWindow from your computer hard drive. They can only be loaded from a web-server. This is a security restriction of Flash. It is a good idea to keep 2 versions of the landscape folder - for web-site and for YoWindow desktop.
weather forecast