Local Weather PocketMod

30 Oct 2006

weather forecastI had a break-though in my Pocketmod ( PocketMod is a standalone flash player) module programming experiments. I have away to have user customized mods. Here is my first one in the series. Weather forecast, download the swf and modify your xml. Here are the rules:

  1. The label in the xml must be “Weather”
  2. You can only have one copy at a time, it will use the last one in the list
  3. Rename the swf to zipcode of the forecast you want.

Hopefully the next version of wordpress will allow me to post xml snippets better.

It’s a little large for a pocketmod, because of the graphics and the fact the fonts are embedded (for print rotation).


Actions

Informations

6 responses to “Local Weather PocketMod”

23 01 2007
Scott (23:28:46) :

I just stumbled on these PocketMod pages you’ve designed, and they’re really cool. But I can’t seem to get this weather one to work. I put the .swf file in the “root” mods folder (i.e. the mods folder that holds the blank, cover, cover_customize and template files in the initial installization). I initially renamed the .swf to my home zip code (which is out in the sticks a little), added the XML node to the mods.xml file, and saved. The Weather page shows in the PocketMods “Select a mod” list, but when I click it, the preview says “You did not rename your swf to your zip code” - though I did. I thought maybe my zip code was too remote, so I tried the zip code for Asheville, NC, the closest minor city, but with the same results. Finally, I tried reseting everything back to the original (Orlando?) zip code, and it still doesn’t work.

Any ideas what I might be doing wrong? If you’ve got any ideas what I might be doing wrong, I’d appreciate knowing what I can do to make this work.

Thanks again for the cool PocketMods.

24 01 2007
admin (00:14:41) :

Hi Scott,

It looks like you stumbled on to a bug. The easiest fix is to move the weather mod into a folder under the mods directory. For example “/mods/fairlyuseless/28801.swf”.

Then place this in your “mods.xml” file.

<folder label=”Fairly Useless” folder=”fairlyuseless” icon=”" isBranch=”true”>
<mod label=”Weather” desc=”Asheville Weather Forecast” url=”28801.swf”/>
</folder>

That should fix it for now. Also it will only use one weather mod at a time.

16 04 2007
Joe (11:05:46) :

First of all, great mod. I use this one all the time.
I’ve found an interesting bug / side-effect.

1. Navigate to weather.com through IE and change the default unit to Metric.
2. Load the weather mod
3. The English/Metric values now are not calculated properly (Fahrenheit value displays Celsius)

Thanks again for the great mods.

16 04 2007
admin (23:03:51) :

Hi Joe,

I could not reproduce the bug on my Mac, but I can see what is happening. Weather.com, which is what I use for the weather xml by default returns “English” units. What I am surprised about is that a cookie from IE is affecting the xml feed in the standalone flash player.

In fact the wind speed should be wrong too. I went back and looked and I didn’t bother getting the metric values I just converted them from Fahrenheit to Celsius. I will see if I can recode it to be a little smarter.

27 07 2007
helllpMEE!! (14:06:24) :

It doesn’t work!!!! I have it in a subdirectory (\mods\custom\) and in my mods.xml

27 07 2007
admin (20:44:49) :

@ helllpMEE!!

What zipcode are you using? Does it work on weather.com? Did you rename the swf?

You should have something like this in your mods.xml file.




Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>