I would like to create an alternative version of my "Animated Weather HD" widget:
http://jimking.deviantart.com/art/Anima ... -495187763I was thinking to add 5 more weather icons below (forecast) with the same function/animation/modes
But I'm not so sure how exactly I have edit the script, so all the components will have the same behavour..
The original script is this (made by @hamid)
Code:
//Script Author: Hamid ;
var oldweather;
function widgetOnLoad()
{
Startingup=true
AnimLoopMenu.Checked=GetIni("AnimLoop",0)
AnimLoopMenuOnClick(AnimLoopMenu)
Startingup=false
}
function accweathercore1OnUpdate(Sender)
{
var weathertmp=accweathercore1.get("${curWeatherIcon}")
if(weathertmp!=oldweather)
{
oldweather=weathertmp
WeatherObj.Src=""
var listtmp=""
var imgtmp=GetFileList(WidgetPath+"Images\\"+weathertmp,"png",0).split("|")
for(var j=1;j<imgtmp.length;j++)
{
listtmp+="Images\\"+weathertmp+"\\"+j+".png"+"|"
}
listtmp+="Images\\"+weathertmp+"\\"+imgtmp.length+".png"
WeatherObj.Src=listtmp
StartAnimating(WeatherObj)
}
}
function StartAnimating(Sender)
{
Sender.Play=0
Sender.FrameIndex=0
Sender.Play=1
}
function AnimLoopMenuOnClick(Sender)
{
if(!Startingup)
{
Sender.Checked=!Sender.Checked
SetIni("AnimLoop",Sender.Checked)
SaveIni()
}
if(Sender.Checked)
{
WeatherObj.LoopCount=0
StartAnimating(WeatherObj)
}
else
{
WeatherObj.LoopCount=1
}
}
Thanks in advance...

_________________
...and remember: don't take life too seriously...My profile on Deviantart:
http://jimking.deviantart.com/