Home Tutorials Forums Articles Blogs Movies Library Employment Press
By Alex Nino
|
Published

It has been a while since I've published my last post. To be honest I just been unbelievable busy and I didn't have much spare time for making new experiments; those I do for fun with no pressure, no rush.

Couple of weeks ago, by chance I read some articles (from different sources) about global warming, overpopulation, worldwide resources, world's education and that entire thing you might have heard already about humans destroying the planet slowly. I know that you may be feeling a bit tired about this subject but I was actually thinking what if you have a real chance of making instant-huge changes on earth, what would you do?

So, in one afternoon during my coffee break, I wrote down an email with some specific key questions and I sent it to some friends around the world (thanks everybody for the well detailed answers), these answers gave me a good idea about what kind of resources-tools we could use for making quick-drastic changes on Earth so I built up a Flash interface with the idea. I have published the whole thing on facebook but it is also available here (both use same database)

http://www.yoambulante.com/en/labs/FixPlanetEarth/


The technical part

Well, it is all about Flash and using some resources only available on Flash player 10 like its drawing API; copyPixels, drawTriangles, blending modes, etc. It is a bit interesting, this app didn't take me long, I did the whole thing from scratch in just few days. It took me exactly 9 days working at nights, it definitely looks more complicated of what it actually is. I think it could be a good practice for the people who are interested to know how it was made. This is a very simple program, it is pure actionscript without using extra libraries or extra resources (I am not using any 3D Engine), it is just actionscript with some good magic bits of bitmap data manipulation (the performance of the app when rollover the countries on a 3d projections was a good challenge).

I am currently thinking in writing an article explaining it step by step divided by days. You might wonder where I got all the data from, textures, countries data, filters, etc, and the answer is simple; Wikipedia. Did you know that Wikipedia has an API which you can use from Flash and extract any kind of data you want?

I have extracted automatically all data I needed in my app from Wikipedia, including the countries coordinates, capital, globe coordinates in degrees (latitude and longitude), mouse rollover sectors, highlights; i.e. this piece of code extracts from Wikipedia the string where the capital name of a country localized:

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onCountryData);
var country:String = "France";
loader.load(new URLRequest("http://en.wikipedia.org/w/api.php?action=query&titles=" + country + "&prop=revisions&rvprop=content&rvlimit=1"));

function onCountryData(e:Event):void {
var data:String = loader.data;
var found:int = data.indexOf("|capital");
if (found > 0){
//shows the string where the capital is
trace(data.substring(found+9,data.indexOf("\n",found)));
} else {
trace("capital not found :(");
}
}

Unfortunately, I ran out of time, this is all what I can say so far, I will write down an article explaining it bit by bit (I soon as I have the chance) it was a very interesting practice for me.

Cheers guys!



Spread The Word


12 Responses to "Let's nuke the planet and fix some problems"

 
Brandon Bugger
said this on 28 Jun 2011 5:08:20 PM CDT
This is a cool interactive animation. I love it. It is quit interesting to see what people choose to do as well. This could be some great statistics the more this gets used.

 
Potemkyn
said this on 29 Mar 2011 11:49:29 AM CDT
Nice animations and graphics. Will you be able to make a tutorial for making this?

 
Starr
said this on 23 Apr 2011 5:02:17 PM CDT
That's not just the best ansewr. It's the bestest answer!

 
andy carol
said this on 04 May 2011 4:50:25 AM CDT
Thank you really for helping make the post give light to many problems we have had before now.

 
car dvr camera
said this on 11 Jul 2011 10:47:58 PM CDT
global warming, overpopulation, worldwide resources, world's education ??An eternal topic

 
yoga certification
said this on 29 Jul 2011 10:40:15 AM CDT
Well, that is definitely one approach. I would not necessarily go this far. I do think we still have some opportunities of turning things around. You would be surprised at how quickly things can be fixed if we all banned together.

 
bmw e90 navigation
said this on 03 Sep 2011 4:50:49 AM CDT
Thank you so much for providing such a informative article on this topic. I really appreciate your work, Please keep it up budy. God Bless you

 
Wind Forecast
said this on 25 Oct 2011 10:42:39 AM CDT
Nice Article....

 
Riefz
said this on 28 Apr 2012 11:05:38 PM CDT
great information!!

 
Prestashop modules
said this on 14 Sep 2012 4:38:53 AM CDT
The picture look nice but can be made more clear.

 
Toni
said this on 25 Nov 2012 7:02:54 AM CDT
Great info.. stop global warming with planting trees

 
Candly
said this on 21 May 2013 9:17:57 PM CDT
Thank you for sharing! Great information . buyincoins




Leave a reply:
Your Name *: Email (private) *: Website:
Please copy the characters from the image below into the text field below. Doing this helps us prevent automated submissions.
Security Code: img

Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.