Tuesday, May 13, 2008
Everyday Italian!
Ciao - pronounced "Chow"
This one is obviously Italian but people do say it and mean "Goodbye." Interestingly enough, it also means "Hello" in Italian.
Presto - pronounced as it looks "Press-toe"
In English, we hear this in a magic act, "And presto-chango, the bunny has disappeared!" In Italian it means "See you soon," which is a funny thing to say to something that is about to disappear.
Squattrinato - pronounced "Skwa-tree-Nah-toe"
The exact Italian phrase might be "Sto squattrinato" or in English, "I'm broke." To the average American you might hear someone ask, "Could I borrow a few bucks?" and their response would be "I got squatt!"
So now you know a few Italian words that you likely already knew.
Sunday, May 11, 2008
Tea at Kensington Station Interview with Poet Chris Choate
This is a video of Chris. We chatted about his life in poetry, from how he got into it to the backstory on the poem "Tea at Kensington Station." Hopefully I will find the time to edit and upload Chris performing this poem in the next few days and weeks (I had a lot of fun filming it) but in the mean time, here is the interview.
(If you cannot see it here, you can check it out on my youtube page: http://www.youtube.com/enginpost )
Friday, May 9, 2008
Jersey Jungle
Wednesday, April 23, 2008
Selling the Jeep
Thursday, April 3, 2008
Film and Politics
One of the most influential filmmakers in the short history of film would have to be Akira Kurosawa (1910 – 1998). And while many modern filmgoers might not know the name, they would definitely be affected on some level by the more modern and popular directors of our day that celebrate the rich visions of Kurosawa (Steven Spielberg, George Lucas, Martin Scorsese, etc.) In fact it wasn’t too many years ago that Kurosawa was given a lifetime achievement award by the Academy. Having watched nearly all of the Kurosawa films that I can get my hands on, I can tell you that while they typically move at a slower pace that the modern A.D.D. adrenaline-paced jump-cut media equivalent made popular by MTV in the 1980s, the imagery, the drama and character depth, and the storylines remain relevant and completely visually captivating to this day. But for me, one very fascinating facet of his life in beyond simply talking about his films would be the history the man lived through (without making to pop a reference, or likening him to the simplicity of the character, he is to Japanese and world history events as Forrest Gump was to American history.)
So here is the interesting history bit: Kurosawa was getting into the filmmaking arts in the political post-imperial history of Japan, the end of the age of the samurai, but still influences by the samurai social classes. He has these vivid memories of his father wearing a samurai topknot-hairdo and striking certain very ritualistic poses when polishing his samurai sword. In fact, Kurosawa made quite a number of films on the topic of the samurai. But Kurosawa was a modernist and Japan was changing. One of the ways this was exemplified was in his alliance with the art communities Japanese Proletarian Movement (more on that, and even more.) They were these romantic artists who would paint, draw, perform and make films that placed a certain emphasis on the average working class person. History tells us that the proletarian movement was fundamentally a Marxist effort to move society and government toward a Socialist mindset (understanding that while this is a simplification of the terminology, Marxist socialism would eventually evolve, or devolve depending on your perspective, into a modern communism paradigm.) So here is Kurosawa feeling that things need to socially change to benefit the common man, and so he and his artist friends decide to throw in their talents in the realm of this Japanese Proletarian Movement, attempting to have an affect on society but more specifically government to take up these causes.
Jump to post-World War II occupied Japan, occupied meaning American soldiers, political advisors, and business consultants came to Japan to “occupy” it for the sake of change for the following seven years of history. Kurosawa would say of this transition time in reflection that while he was a part of the Japanese Proletarian Movement, he wanted to keep working, so he never did create any art that put him in hot water, politically speaking. But then some interesting history happened. Contemporaries of Kurosawa in the film industry began to speak of the “occupational army” as the “liberation army,” meaning that people began to get a grip on the values of a real democracy in contrast with the socialist-Marxist ideal and saw the outcomes of freedom begin to reach into their social experience. Soon Kurosawa would leave behind his earlier feelings about the Proletarian Movement and embrace this new found freedom.
"The freedom and democracy of the post-war era were not things I had fought for. They were granted to me by powers that were not my own. As a result, I thought it was all the more essential for me to approach them with an earnest and humble desire to learn and to make them my own. But most Japanese in these post-war years simply swallowed the concepts of freedom and democracy whole, waving the slogans around, without knowing what they really meant." -Kurosawa.
At this time in history Kurosawa would go on to make movies like “No Regrets of My Youth” which document the emotional impact of freedom liberated to them by the new democracy, making movies about love and youth. Kurosawa began to explore a number of topics that touched both Japan and the West. But being a student of life and a studier of people and society, he began to see a negative side effect of democracy, a weakness in it’s exploits, in that Japanese young people (people like him, in their 20s and 30s) were entering into an age of hedonistic and libertinistic lifestyles. The freedom that liberated also gave them the opportunity to loosely apply that same freedom as an investment in their own social destruction.
In response to this, Kurosawa redirected his interest toward creating films that pointed to these self-destructive lifestyle choices, in movies like “Drunken Angel.” As a result many youth at that time reflected on watching the movie and how it helped them to step away from those types of destructive lifestyle choices.
Here is where the history lesson ends and some commentary begins. I think that we can see so much of our modern reality in the life and experiences of Akira Kurosawa. If you read over the definitions of Hedonism and Libertinism you can see how this particular weakness in democracy has pervaded our social experiences: from work, to school, to films, to politics. These days people act as if the presence of hedonism is like a star on the flag of our American democratic freedom, media pretending that our soldier are out fighting for our right to be hedonistic. The phrase hedonistic doesn’t exist in our society any more, probably because of the negative connotation. Now it is politically redefined as a protected class of freedom, defended by our democratic way of life (no longer a weakness but rather a core protected belief system.) Now, couple that with a modern proletarian movement: hedonistic lifestyles that want the government to finance support and become responsible for Marxist-socialist ideals. In the end it looks like the following: people buying into a social paradigm that says they should live their lives with their happiness as the highest ideal, and at the same time institutionalize social programs that take care of “others” via the government. Does this sound at all familiar? I think it is bleeding into our democratic-social model, and is becoming the new democratic-socialist-Marxist paradigm (aka modern communism.)
Reflect on the following: If your highest ideal is equal to where you put your time, money and life, is your personal happiness your highest ideal (forget what you say, how are you living?) And are you expecting that institutionalized social programming is the answer to social issues (has this crept into your ideology?)
Some might read this as a little alarmist, but again, like Akira and "Drunken Angel", media has an influence on our values and I am simply concerned that “Those who cannot remember the past are condemned to repeat it.“
Wednesday, March 5, 2008
Dynamic TextFields Anti-Aliased for Animation and Readability using Dynamic HTML Text
This article will outline the following flash issues requiring understanding to utilize shared fonts in Flash:
- How to build a shared library.
- How to share fonts in a shared library.
- How to plan for your fonts and their usage.
- Implementing shared fonts in Dynamic TextFields with HTML text.
In my time with Flash the most common text-requirement in a Flash movie has been the following:
- The project requires text on the screen to be dynamic.
- The project requires that the text anti-alias well.
- The project requires that the dynamic text animate in some manner, at least into view, rather than simply suddenly being on the screen.
- The entire movie should be as small as possible to make it snappy over a thin and reasonable bandwidth.
While you hear less about requirement #4 over the years, mostly due to increases in bandwidth, depending on the size of the project and how many SWFs are getting created, you still likely have to think about file size. I would go so far as to say that even if it is not mentioned explicitly as a requirement, it is understood implicitly to be one.
On requirement #1, the simple answer is loading in the text data. While the technique dejur may have been LoadVars objects, now replaced by XML, the bigger issue is that you are working with a TextField in a Dynamic Text state. The font issues change depending on the state you are using.
On requirement #2, the answer would normally be to apply anti-aliasing for “readability” (advanced anti-aliasing) if you want the text as clear as is possible. Suddenly, in your Dynamic TextField you are now confronted with having to embed your font outline in this TextField. No problem.
On requirement #3, stuff starts getting more complicated. What you really need to do here is anti-alias for “animation” which conflicts with anti-alias for “readability” since the Flash User Interface only applies these options in a mutually exclusive manner. So you change it to “animation” since this eye-candy is a requirement not likely to go away.
Back to requirement #4, you render the FLA into a SWF and confirm that the file size remains quite reasonable despite the fact that you are embedding your font. You are thrilled with your result (even though you are anti-aliasing for “animation” and not “readability.”) Even if you have to duplicate the TextField, Flash is smart enough to not re-save the font outlines and double the size of your SWF when it renders. Great!
Enter dilemma:
While some project elements are able to completely co-exist in a single SWF, the far majority of the projects on which I have worked load a number of SWFs, usually all into a single Movie that works like a loading container. Sometimes, things get more complicated than even this (images loading into MovieClips, in SWFs, that are loading into other SWF containers, etc.) The dilemma arises on a number of levels when you begin to realize that you are embedding that same font into a number of movies. Here are the issues (there might be more, but these are my top two):
- Because you are placing font outlines in each movie (SWF) you are requiring additional bandwidth of the “web surfer” to re-download the font data for each movie (SWF) that loads.
- If at some point in the project, you suddenly have to change a font that was previously applied, you have to open each movie (SWF) and meticulously change each TextField, pointing it to the right font and re-embedding the new font.
The solution I am going to explain resolves both of these issue and in a fairly slick manner. I will also tack on a solution that allows you to anti-alias for both “readability” and “animation” at the end (but it comes with a warning.) Let’s get started.
How To Build A Shared Library
The answer to our font bandwidth issue is found in something called a shared library. This is far easier than it sounds, but can sometimes be difficult to find info on (hence the article here.) Here is how you build a shared library, step for step (note that there a a lot of steps, but I am outlining steps you probably do without thinking so not much of this will seem new):
(The following assumes you are using at least the Adobe Flash 8 Designer/Developer tool.)
- In Flash Designer, Create a new Movie (Flash Document.)
- Save the new file as “fontLibrary.fla” (call it whatever you want)
- Under File, Project properties, uncheck the “HTML” format and hit “OK” (we don’t need flash to create an HTML page for our fontLibrary.swf file.
- In the timeline, change the one available layer into a “Guide” (We don’t want to accidentally create anything on the stage. Our fontLibrary should have no “stage’ assets.)
- Now, in your project’s library, click the menu icon in the upper right corner of the library panel and select “New Folder.”
- Rename the new folder to “Shared Fonts.”
- Now, in your project’s library, click the menu icon in the upper right corner of the library panel and select “New Font.”
- Give your font a name that will make the most sense when you come back and visit this fontLibrary or any of your movies that will use your shared fonts later on. For example, as a standard, I name the font starting with an underscore character and the project name, like “_nxFrameworkFont” which helps later in a number of ways (I will show you that very soon.)
- Here is a big trick: Select your font name from the list (the one you want to embed) and be sure that none of the other boxes are checked (like Bold or Italics and size doesn’t matter here) and hit OK.
- Now, while I will explain this later, go ahead and create two more versions of your embedded font, one with the Bold box checked and one with the italics box checked. I named these “_nxFrameworkFont-bold” and “_nxFrameworkFont-italic” respectively.
- Drag all three of these fonts into the “shared fonts” folder you created before.
Now we need to setup these new fonts for sharing. - Select the first font you create, right-click it and select “Linkage”.
- Check the top three Linkage boxes: Export for ActionScript, Export for runtime sharing, and Export in first frame.
- You do not have to associate this with a class, but rather specify the name of this fontLibrary.swf in the URL field. In my project, the SWF will be rendered as “fontLibrary.swf” and so that is exactly what I write in the URL field.
- Apply step 14 above to all three fonts symbols you have created.
Now, just save your work and render the SWF hitting [shift]+[F12].
You have completed the first step of building a sharedLibrary. Told you it was simple.
How to Share Fonts in a Shared Library
Now that you have your shared library, in my case named fontLibrary.swf, you need to use those fonts in your TextField animations in other movies (SWFs.) To demonstrate this, following these next steps:
- In Flash Designer, Create a new Movie (Flash Document.)
- Save the new file as “shell.fla” (call it whatever you want)
- We need to setup our shared fonts and this is simple. At the top of your Library panel for this project, notice that you have a pulldown menu that shows you other libraries you currently have open. Go ahead and select the fontLibrary.fla from the list.
- Now, drag the “shared fonts” folder to stage in your new “shell.fla” project.
- Notice that nothing appears on the stage, but if you switch back to your shell.fla library in the library panel you can see the fold and all of the fonts are imported.
- Notice that the font symbols state that they are “imported” – this is Flash doing the work of simply borrowing the outlines from the other SWF once this SWF and the fontLibrary SWF are both rendered.
- We need to create a movie clip to animate with dynamic text in it, so go ahead and draw a box of any color on the screen.
- Place a TextField above the box.
- Select both the box as well as the TextField and create a new MovieClip out of it by hitting the [F8] key.
- Be sure it is set to be a MovieClip and name it “mcMessage” and hit OK.
- Now in the properties, with the MovieClip on the stage selected, give it an instance name of “objMessage”
- Edit the MovieClip on the stage by double-licking it and select the TextField you created.
- We want to change this to a dynamic TextField that can work with HTML, so go head and switch its state to Dynamic Text, and confirm that it is set to Multiline and HTML Text in the properties. Below where you changed its state to Dynamic Text, give the field a name of txtDynamic (you do not need to give it a “Var” name.) Go ahead and uncheck “selectable” and “show border” if they are toggled in the “on” position.
- Now simply select the initial font we previously created and imported. Notice that because of the underscore “_” character, our font sits at or near the top of the list of available fonts.
- Return to the scene and save your work.
Now we want to dynamically add some text and do a little animation, so add a layer to your “shell.fla” project and hit [F9] on that layer to add some ActionScript. Add the following ActionScript to the frame:
import mx.transitions.*;
import mx.transitions.easing.*;
this.objMessage.txtDynamic.htmlText = "The quick brown fox jumped over the lazy dog!";
new Tween(this.objMessage, "_alpha", Strong.easeIn,0,100, 2, true);
This is what we are doing. The import statements allow us to easily programmatically Tween our MovieClip. Next, we are dynamically adding htmlText to our TextField. This could be coming from XML or a LoadVars object, but we are hard coding it for the example. Finally, we are tweening the alpha of the MovieClip from 0 to 100 over a period of 2 seconds, which basically fades in the image.
If you run the “shell” movie now ([ctrl]+[enter]) you will notice that the MovieClip fades in, including the text with your shared font, and all of the HTML formatting. Very cool. For fun now you should go back into the fontLibrary.fla and in each font symbol, change it to another font (remember, then must all match, the only difference being whether the bold or italic boxes are checked.) If you re-render the fontLibrary.swf, and (without re-rendering the shell.swf) run the shell.swf, it will now show your animation and text using the new font in the fontLibrary.swf!
You should, however be wondering how it is able to anti-alias for animation at this point without embedding the font or selecting that as an option in the TextField properties? As importantly, you might also be wondering how we are getting bold and italic text to show up since we only applied the font without the bold and italic options to our TextField. And what if we changed the htmlText so that the word lazy should show up both as bold AND italicized? Would that work? Could you have simply shared a single font with the bold and italic boxes checked and would that single shared font have solved everything? All of these questions are handled in the next section.
How to Plan for Your Fonts and Their Usage
The biggest issue in using shared fonts is getting them to act like embedded anti-alias for animation fonts do inside a TextField, but in some cases looking like anti-aliased for readability at the end. In nearly all cases, animation is a requirement, even if only for a second when the text shows up on the stage. So you will notice that while creating one uber shared font with bold and italic boxes checked will work with the HTML to look correct, suddenly the animation will go away (rather than fade in, the background box fades in over 2 seconds, but the text is immediately on the screen.) This is why we create multiple shared fonts, and this is how that works:
In flash we only applied our most simple shared font to our TextField (not the bold font or the italicized font symbol). When flash renders the HTML into the TextField, it can easily render that font under most circumstances. By default it renders this as if we have embedded the font and setup anti-aliasing for animation (again, this is the default behavior.)
Now, once it hits the first HTML bold tag or Italics tag, flash realizes that the font symbol we are applying doesn’t contain those font outlines. Flash then goes looking for those fonts and specifically searches in a particular order. That order seems to be (though I can’t say I figured this out by anything other than hit or miss) (1)first it looks in any font symbols available, (2) then it looks on the hard drive of the user, and finally (3) it uses the most generic version (_sans, _serif, _typewriter, etc) it can figure out to use. Here rests the magic. It finds the right font to apply in our other font symbols and applies them without breaking the anti-aliased for animation behavior. Magical! Again, if all of those outlines were in one font symbol, it would have broken our animation. Try it and you will see.
But what does this mean for any italicized bold text. When you are using shared fonts (or font symbols at any time) and flash encounters a font reference that it cannot resolve, your text just disappears. For example if the word “lazy” was supposed to appear as italicized bold text per the HTML in the TextField, then the txtDynamic TextField would render out “The quick brown foxed jumped over the dog” (and skipped rendering that word "lazy" altogether.) The solution is, as you are likely imagining, creating another shared font symbol with both the bold and italic boxes checked! And problem solved. Since most other special text effects are handled outside of font outlines (for example, underlining text is not an outline but a text effect) embedding those four font symbols solves our need to share fonts and achieve animation like embedded fonts.
Implementing Shared Fonts In Dynamic TextFields With HTML Text.
At this point you should be able to understand this very quirky (but consistent) solution and while it would be overkill to apply this to only one TextField in only one SWF, go back and consider the project that includes quite a number of SWFs all with their own TextFields and embedded fonts. If you implement this technique, and someone yells “font change!” at any point in your project, you can now handle it in one simple place and with one quick SWF render!
Anti-Aliasing For Readability Footnote
As promised, I will talk about implementing “Anti-Aliasing for Readability.” The issue here is that you want your font to animate BUT you also want it to look it’s absolute best for reading. Well, consider the following simple line of code:
this.objMessage.txtDynamic.antiAliasType = "advanced";
And now you still get animated text, but it is also anti-aliased for readability. But recall that this comes with a warning. Animating text that is anti-aliased for readability can be processor intensive (on the client-side at runtime.) I will describe how the work-around for this works (briefly… because there is a downloadable example!)
In a nutshell, whether you are programmatically animating using the Tween class, or if you are animating on the timeline, you would want to wait until the animation completed before changing the antiAliasType on the TextField to “Advanced” (which makes it resize a little because of the difference in rendering.) In the downloadable example I show you how to apply this both at the end of a timeline animation as well as when the motion completes in a programmatic Tween.
For future ideas, you might look into custom programmatic anti-aliasing which might help you find a middle ground between anti-alias for animation and anti-aliased for readability.
Now click here for the downloadable sharedFonts with HTML and annimation!
Tuesday, March 4, 2008
For the Record: The last word on WMDs in Iraq
The 109th Congress wrote up a document outlining a slew of reasons to travel into Iraq and unseat the leadership of that country. The most notable items on the list were items such as:
- Intelligence information that noted that Iraq was still not in compliance with the result of "Desert Storm" which included unseating Saddam if they were not complied with (something that Bill Clinton should have done, instead of dismantling the CIA at the same time.)
- Historical evidence including claims by Saddam when he attempted (multiple times) to assassinate President George Herbert Walker Bush (evidence and fact alone worth unseating him, in my opinion) since Dessert Storm.
- Intelligence information that implied there likely existed Weapons of Mass Destruction (WMDs) in Iraq.
This is by all means not a complete list of reasons why congress felt it was time to go into Iraq, and nobody contests the reality of first two items (recall when Saddam held UN inspectors hostage and steered them around munitions depots and their reports all stated that he was not complying with inspections?), but we hear a lot about how WMDs were never found and we as a nation were "lied to by the President!" This is the mantra of a segment of congress, both that voted for against going into Iraq and especially those who voted for going into Iraq (as in, "Yes, I voted that we go in, but I was LIED TO!"
First, check out the following definition of what exactly a WMD is: http://en.wikipedia.org/wiki/Weapons_of_Mass_Destruction
While the press after 9/11 was doing a lot of chatting about dirty bombs and suitcase nukes, I can say that while those would be considered a WMD, that none of the devices and tactics outlined in the wikipedia article would be something I would want stored in, near or around my home! In other words, like many, when I heard the term "WMD" I might have thought "nuclear bomb" but the term outlines a number of glorious ways to died that are equally if not more painful that being vaporized by a Nuke!
Take for example, Sarin Nerve Agent (a chemical weapon): http://en.wikipedia.org/wiki/Sarin
Ouch! A weapon classified by the United Nations as a WMD the symptoms are twitching, jerking, suffocating, vomiting and defecating, and eventually death if exposed to as little as .01 milligrams per kilogram of body weight. And if you happen to live through a micro-sized dose, then you will still have to live with brain damage as a result. Please, give me the Nuke over Sarin Nerve Agent any day!
Oh my gosh, why am I being so graphic!? For one reason and one reason only...
http://www.foxnews.com/story/0,2933,200499,00.html
In short, there were (and according to congressional reps, likely still exists a threat of) WMDs (of this kind) in Iraq. Anyone so ignorant enough to say "Well, everyone thought the President meant Nukes and so he is still A LIAR!" is simply exposing their ignorance and prejudice at this point. If you are still convinced, then apply the same test that I applied above and decide how you feel:
Would you be willing to expose your friends, family or kids to Sarin Nerve Agent (again, a UN classified WMD)? No? I didn't think so. Then stop splitting semantic hairs over WHICH kind of WMD was found in Iraq (hello?) and ask yourself why the press and elements of congress lambasted the WMD issue and were undervaluing the actual facts here? (what is the goofy agenda on that one?)
... or just continue to split hairs and be cool with Sarin Nerve Agent and propagate the idea that WMDs are ONLY Nukes and act like this stuff was never found!
I guess that is my last word, for the record!
UPDATED: Since writing this I have read that the Sarin Nerve Agent found represented a cache of degraded Sarin, meaning the threat of the Sarin was reduced by it's old age. But get this. Saddam was told as a condition of the result of Dessert Storm that all of those munitions must be turned over to the UN Inspectors, which it was not. Even in a degraded state, it is said by the defense department that these were "not the WMD we were looking for when we went in this time" that this Sarin in it's degraded state was still potentially lethal. I can say that no matter the age, the fact that they were still there and that Saddam was keeping them from post-Desert Storm UN Inspectors was still grounds enough based on the results of Desert Storm to unseat Saddam (which is what we said we would do, back then.) Thank God we didn't find other newer WMDs, but that is no reason to not keep our word on demanding Saddam's compliance with the results of Desert Storm. Not finding what we thought could be there isn't a LIE but rather a blessing in the light of what we have found to be true in Iraq.





