To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-20-2006, 09:32 AM   #1
hansverst
Member
 
Join Date: Mar 2003
Location: Netherland
Posts: 33
Weather project

Hello,
i try to make a nice online weather report for my weatherstation min, max, and normall temperature, just like the picture below.
So what i like to do is, add a value for the normall temperature for this day (let's say 4,5c) this is value that will not change till the next day, and in the color box the current temperature, so when the ActionScript is get a value from my station, the color is going up or down. (update every 5 min)
I think this is posable in KoolMoves, but don't know where to start.
Hope some one can help me.
Thank you.
Gr Hans
Attached Images
File Type: jpg grafiek.jpg (34.3 KB, 16 views)
__________________

Last edited by hansverst; 12-20-2006 at 09:37 AM.
hansverst is offline   Reply With Quote
Old 12-20-2006, 10:49 AM   #2
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
If the data is retrievable I'm sure it can be done in KM.

What format is the data in? How are you getting the data.
blanius is offline   Reply With Quote
Old 12-20-2006, 11:20 AM   #3
hansverst
Member
 
Join Date: Mar 2003
Location: Netherland
Posts: 33
Hi Blanius,
the data is text/plain the values are true values, like 10,1 for 10,1 celecius
and for rain, 0,7mm etc
So i use special weather software (that updates the weather station and get the current data) and that software make a text file report.ws from all data like wind, rain, sun, temp, etc.
Gr Hans

This is how it looks.

--------------------- sorry in dutch only

Weergegevens - Report: 2 m boven zeeniveau
woensdag 20 december 2006 - 16:27

Temperatuur Buiten 1.25cm
huidig 4,2 °C
Gemiddelde 0,7 °C
min. -1,8 °C 03:47
max. 4,2 °C 16:07

Temperatuur Buiten 0.20cm
huidig 4,4 °C
Gemiddelde 1,1 °C
min. -1,4 °C 03:42
max. 4,4 °C 16:27

UV X
huidig 0,0 UV-I
Gemiddelde 0,0 UV-I
min. 0,0 UV-I 23:12
max. 0,3 UV-I 11:02

Vochtigheid Buiten
huidig 95 %
Gemiddelde 93 %
min. 91 % 23:12
max. 95 % 11:42

Windsnelheid
huidig 2,9 km/h
Gemiddelde 0,2 km/h
max. 3,5 km/h - W-ZW 16:17

Neerslag
laatste uur 0,0 mm
huidige dag 0,0 mm
laatste 24 uur 0,0 mm
huidige week 0,0 mm
huidige maand 0,7 mm
huidig jaar 0,7 mm
Regen / Jaar 1 dagen

Luchtdruk
huidig 1038,8 hPa
Gemiddelde 1038,1 hPa
min. 1036,3 hPa 13:12
max. 1039,2 hPa 10:52

Weersvoorspelling: zonnig

--------

i think to get the data is not that hard, but to change the graphics if the value is change.
I think there have to be a min and a max default value. For rain it would be like 0,0 mm for min and max like 20 mm (that would be 100%) and if the data shows 1,7mm the graphic must go up from 0% to X%
__________________

Last edited by hansverst; 12-20-2006 at 11:42 AM.
hansverst is offline   Reply With Quote
Old 12-20-2006, 01:20 PM   #4
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
those commas are a problem..... Flash doesn't see 1,2 as a number..... So you'll have to deal with that..

Ok here's a start
Attached Files
File Type: fun weathertest.fun (3.1 KB, 8 views)
blanius is offline   Reply With Quote
Old 12-20-2006, 01:22 PM   #5
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
Basically I used onData then replaced all the , with . and then serached looking for min. and max. then grab the temp after those and scaled a movieclip using the tempurature
blanius is offline   Reply With Quote
Old 12-20-2006, 01:47 PM   #6
hansverst
Member
 
Join Date: Mar 2003
Location: Netherland
Posts: 33
Well this look nice, i think i can with your code make a good working weather control for my webpage.
I will let it know if it's done, or not
Thanks for all the help!
Gr Hans
__________________
hansverst is offline   Reply With Quote
Old 12-22-2006, 11:53 AM   #7
hansverst
Member
 
Join Date: Mar 2003
Location: Netherland
Posts: 33
updates

hi blanius,
i did make a good working temp meter. (thanks again for that)
But only one question, now i want to update the data every time a vistor is loading the temp meter.

I try the next code but is still not working proper.

'int' is the time in sec for a new update equally to the real update from the weatherstation.
After that the fun file have to update data every 5 min (equally to the real update from the weatherstation.)
The first time the fun file is loaded, it have to update directly, so the last update from the weatherstation is showing


weatherdat= function (){

_root.loadVariables("http://82.134.247.103/cgi-bin/weer/get.pl", "POST");

temp = searchandreplace(temp,",",".");
p=((Number(temp)+0)/maxTemp)*100
tmpbar._yscale=p
txt1.text=temp+"°C";

setInterval(weatherdat, int);
}
weatherdat(int=1000);


I know i ask a lot, but realy try to learn
Gr, Hans
Attached Images
File Type: jpg blk00001.jpg (44.1 KB, 4 views)
__________________
hansverst is offline   Reply With Quote
Old 12-22-2006, 01:55 PM   #8
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
don't think thats the right way to use set interval

try this
weatherdat= function (){

_root.loadVariables("http://82.134.247.103/cgi-bin/weer/get.pl", "POST");

temp = searchandreplace(temp,",",".");
p=((Number(temp)+0)/maxTemp)*100
tmpbar._yscale=p
txt1.text=temp+"°C";

}
int=1000

setInterval(weatherdat, int);
blanius is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:47 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.