Author: John Winkelman
Nerd Post: Fixing MXMLC After Upgrading Java Runtime Environment
This is another nerd post, so if you are not using the MXMLC command-line compiler to create .swf files, you might want to skip it.
Still here? Okay.
A few days ago my work laptop became infected with the Antivirus Soft malware/ransomware/virus, which rode an infected PDF in through the Acrobat Reader plugin for Firefox. Argh. Long story short, after a couple of hours of trying to get rid of it I contacted our computer tech people to wipe the hard drive and re-install Windows. Everything went quickly and smoothly, and all of the re-installs of everything went off without a hitch.
Except…
In the process of putting everything back together, my JRE was updated to version 6, and that apparently broke something in the MXMLC command-line Flex compiler. I kept getting an error which said “This application has failed to start because msvcr71.dll was not found. Re-installing the application may fix this problem“.
After about half an hour of poking around I found a fix. I don’t want to call it THE fix, because I suspect a future JRE update might remove the original problem, and having the current fix in place might cause things to break. But anyway, quite simply, here it is:
1. Search your computer for a file called “msvcr71.dll” You will probably discover it in several places.
2. Copy the file from your Java Runtime directory. Mine was here: C:\Program Files\Java\jre6\bin\. I am sure any of the other instances of msvcr71.dll will work just as well, but since it was a Java error, it made sense to me to copy the file from the Java directory.
3. Paste that file in the bin directory of your installation of the MXMLC compiler. This is the same directory which contains “mxmlc.exe”.
4. Create and compile a “Hello World” – ish Flash movie to test the fix.
Best of luck if you need to do this.
Books, Early March 2010
Top to bottom:
The Wayfinders by Wade Davis
The Lost Origins of the Essay edited by John D’Agata
Borges: Selected Poems by Jorge Luis Borges
A Buddhist Bible, by Dwight Goddard
Freedom by Daniel Suarez
In Such Hard Times by Wei Ying-Wu, translated by Red Pine
The Windup Girl by Paolo Bacigalupi
Signs of Spring, 2010
I Would Call That a Successful Project
The Grand Rapids Police Department has just launched a new Crime Map. It is very well done, easy to use, and has more detailed and current information than I could ever hope to use in my own map. And, unlike their previous crime map, it doesn’t crash my browser when I try to use it.
I guess my work here is done.
Since I launched my map, back in 2005, I have pulled all of the incidents therein from the local news. News being what it is, only the incidents which were newsworthy made it into my map – mostly violent crime. Happenings which were out of the ordinary. As the data increased over the years it became obvious that, while it is good to know where these incidents tend to occur, it really isn’t all that useful in day-to-day life. Simply put, if something makes it into the news, it is because it is something which doesn’t happen very often.
Consider: I live in a neighborhood for years. One day one of my neighbors goes crazy and shoots his wife. For the next twenty years, nothing news-worthy happens on my street. Yet, because of that one incident, which was very much an outlier event, now my block has the reputation of being the kind of place where people get shot. Adding this incident to a map provides inaccurate information in two ways:
1. It is highly unlikely that anyone will ever repeat that crime on this block again, and
2. This was not a natural consequence of living in a crime-ridden neighborhood.
It is not the newsworthy crimes which define the livability and safety of a neighborhood – it is the mundane, happens-to-everyone incidents, like getting the radio stolen from your car, graffiti, drunken fights during a college party, drug deals, or getting mugged. The incidents which, in a city, tend to become indistinguishable from the background noise until it happens to you.
I created my map as a response to having the radio stolen from my car twice, in two different neighborhoods, two years apart. Yet incidents like that never make the local news. Which neighborhood would you rather live in – the one where someone was one killed in a fit of domestic rage, or the one where people get bikes stolen from their back yards on a weekly basis? The first incident is essentially a Black Swan, and could happen anywhere; from the worst ghetto to the most exclusive gated community. The second tends to happen where people are less involved and less invested in their property and community.
So I am going to stop updating my map. I will leave it where it is, along with the story behind it, and my contact information. I am in the process of upgrading the simple content management system behind the map, and will continue to do so until I decide I have done it right, or until someone releases a software package which does everything my system does, only better.
To all of you who have used my map for the past four years, thank you for your kind comments and suggestions. I am happy that I was able to provide this service for so long.
Once again, the new Grand Rapids Police Department Crime Map can be found at http://www.crimemapping.com/map/mi/grandrapids.
Using .SWC files with the Flex SDK Command Line Compiler
If you are not a nerd, you might want to skip this post. It involves a specific technique for a specific Flash programming and development issue.
Still reading? Okay.
When programming in Actionscript, I use Notepad++ and the Flex SDK command-line compiler. The closer I can get to pure code – or rather, the farther I can get from using a Flash-specific IDE – the better. Unfortunately, there is one big hurdle to overcome when using this work method, and that is the inclusion of .swc files in my projects. A lot of useful libraries (e.g. Google Maps for Flash) come bundled as .swc files, and frankly, unless you want to pull a library apart and play with it, having everything compiled together in one file is pretty convenient.
All of the tutorials and documentation for the libraries contained within the .swc files assume you are using either the Flash IDE or Flash Develop. Nothing wrong with that; it is a fairly safe assumption which covers ~90% of the developers out there. Not so good for me, though.
So it was with unrestrained joy that I found an answer to my dilemma which gave me the best of both worlds. This is a simple extension to the tutorial put together by Senocular a couple of years ago, for those of us who refuse to be locked to a single development environment. The supa-smart Sakri found a way to add the libraries at compile time, without having to do any funky coding, or dealing with less-than-perfect developer tools. The complete instructions (assuming you have downloaded and installed the Flex SDK) are as follows:
0) Open the command prompt
1) drag&drop mxml.exe (or shortcut icon) into the command line
2) hit [space]
3) drag&drop your .as file into the command prompt
4) hit [space]
5) type in: “-compiler.include-libraries” without the quotes
6) hit [space]
7) drag&drop the swc you want to use into the command prompt
8) hit enter
If your code has no errors, then this should create a .swf file in the same directory as the .as file you dragged onto the command prompt. Best of luck!
Times are Tough for Everyone
Night Photos of the Grand River
Ice hanging from a tree stuck on the edge of the Sixth Street Bridge dam, near the fish ladder.
30 second exposure.
Ice on a rock in the middle of the Grand River, near the Sixth Street Bridge dam.
60 second exposure.
Looking East at the medical mile from the fish ladder.
15 second exposure.
Looking East at the medical mile from the fish ladder. The line of lights across the sky is a plane approaching the airport.
30 second exposure.
Looking East at the medical mile from the fish ladder.
15 second exposure.
Flowing Water 1
First run at a simulation of water flowing through terrain. Instructions are to the left of the image.