Elxis CMS Forum
Ελληνικό Forum => Δημόσιο Βήμα => Topic started by: babis1 on May 10, 2008, 17:31:59
-
ξερει κανενας αν αυτο ειναι αληθινο?
http://www.breathingearth.net/
-
Η ερώτηση δεν είναι ξεκάθαρη.
Αλλά θα σου απαντήσω, τα στοιχεία μπορείς να πεις ότι είναι σωστά εάν είναι από τις επίσημες στατιστικές τις κάθε χώρας.
Τα στοιχεία δεν αντλούνται από κάποια Online βάση δεδομένων αλλά απλά από το ακόλουθο xml (http://www.breathingearth.net/countries.xml)
Και οι υπόλοιπη flash εργασία γίνεται με τον ακόλουθο κώδικα, φυσικά ξεχωριστώ για κάθε περιοχή.
VVcountryCounter = 67;
_root.VVnameText = [_root.VVnameArray[VVcountryCounter]];
_root.VVpopulationText = numberToString(_root.VVpopulation[VVcountryCounter]);
Math.round(_root.VVemissionRate[VVcountryCounter] / 1000 * 10) / 10;
if (_root.VVemissionRate[VVcountryCounter] / 1000 < 60)
{
_root.VVemissionsText = [Math.round(_root.VVemissionRate[VVcountryCounter] / 1000 * 10) / 10 + " seconds"];
}
else if (_root.VVemissionRate[VVcountryCounter] / 1000 < 3600)
{
_root.VVemissionsText = [Math.round(_root.VVemissionRate[VVcountryCounter] / 60000 * 10) / 10 + " minutes"];
}
else
{
_root.VVemissionsText = [Math.round(_root.VVemissionRate[VVcountryCounter] / 3600000 * 10) / 10 + " hours"];
} // end else if
if (_root.VVdeathRate[VVcountryCounter] / 1000 < 60)
{
_root.VVdeathText = [Math.round(_root.VVdeathRate[VVcountryCounter] / 1000 * 10) / 10 + " seconds"];
}
else if (_root.VVdeathRate[VVcountryCounter] / 1000 < 3600)
{
_root.VVdeathText = [Math.round(_root.VVdeathRate[VVcountryCounter] / 60000 * 10) / 10 + " minutes"];
}
else
{
_root.VVdeathText = [Math.round(_root.VVdeathRate[VVcountryCounter] / 3600000 * 10) / 10 + " hours"];
} // end else if
if (_root.VVrealBirthRate[VVcountryCounter] / 1000 < 60)
{
_root.VVbirthText = [Math.round(_root.VVrealBirthRate[VVcountryCounter] / 1000 * 10) / 10 + " seconds"];
}
else if (_root.VVrealBirthRate[VVcountryCounter] / 1000 < 3600)
{
_root.VVbirthText = [Math.round(_root.VVrealBirthRate[VVcountryCounter] / 60000 * 10) / 10 + " minutes"];
}
else
{
_root.VVbirthText = [Math.round(_root.VVrealBirthRate[VVcountryCounter] / 3600000 * 10) / 10 + " hours"];
} // end else if
}
countryCounter = 67 είναι η Ελλάδα όπως θα δεις και στο xml.
Ελπίζω να σου απάντησα στο ερώτημα σου.