Da Unicode

In honor of the theatrical release of The Da Vinci Code (and in response to a question about Unicode values for special characters on a list that shall not be named), I’d just like to throw out a pointer to “The Unicode Character Code Charts By Script”, which has numeric codes and graphic depictions of symbols and characters for Latin characters, the Cyrillic alphabet, a variety of Chinese character sets, Gujarati, Cuneiform, Arabic, Cherokee, and many more!

Item 500

Letter to Sen. Ron Wyden:

Dear Sen. Wyden,

It’s long past time for Democrats on the Senate Select Committee on Intelligence to stop giving President Bush the benefit of the doubt. Over and over, every claim they’ve made about issues ranging from WMDs in Iraq to warrantless wiretapping has been proven false with time. Every member of the administration has repeatedly told things to the Congress and the American people that were simply not true.

In the past, some of those claims have been explained away as errors and not lies, but so many of them have been exposed now as truth shaved so bare that it bleeds or outright falsehoods — as in the case of the NSA phone data collection program — that the preponderance of evidence is on the side of them all being lies.

It’s time for you and your colleagues to speak out. Intelligence is one of the most important issues in a world where continued tensions over fake nuclear threats in Iran could draw us into real nuclear conflict with Russia and China. If Democrats want to be seen as serious about national security, they’d better treat intelligence as a serious issue instead of another arena for national political strategy.

Color Me Flash!

Over on DIRECT-L the other day, a question (thread: "FLASH: how to pass color string from lingo ") arose about how to pass a color value to a Flash sprite from Lingo. A couple of responses discussed how to pass the value in as a string or as a number, both of which need to be converted to colors within Flash.

In many cases, whatever you do in Flash, you’ll need to work with ActionScript’s Color object to do things like change the color transform of a movie clip. I’ll tell you now how to do that directly from Lingo.

The basic ActionScript procedure for changing the color of a movie clip is this:

  1. Create a Color object associated with a movie clip.
  2. Create a variable containing a duplicate of the transform of the Color object.
  3. Modify the transform variable’s properties.
  4. Set the transform of the movie clip’s Color object.

Assume you’ve got a Flash sprite in channel 1 with a movie clip named test at the root level. To create and associate an ActionScript Color object (co) with the movie clip:

  co = sprite (1).newObject ("Color", sprite (1).test)

To make a copy (tr) of the Color object’s transform:

  tr = co.getTransform ()

The transform of the ActionScript Color object is an object containing eight properties:

red multiplier (0 – 100); mulltiplied by the current red value
red offset; added to the multiplied red value (final value has a minimum of 0 and a maximum of 255)
green multiplier (0 – 100); mulltiplied by the current green value
green offset; added to the multiplied green value (final value has a minimum of 0 and a maximum of 255)
blue multiplier (0 – 100); mulltiplied by the current blue value
blue offset; added to the multiplied blue value (final value has a minimum of 0 and a maximum of 255)
alpha multiplier (0 – 100); mulltiplied by the current alpha value
alpha offset; added to the multiplied alpha value (final value has a minimum of 0 and a maximum of 255)

These properties can be set directly once access to the transform object has been established. For an unmodified movie clip, the color transform will be: {ra: 100, rb: 0, ga: 100, gb: 0, ba: 100, bb: 0, aa: 100, ab: 0}, which is basic black.

Changing the movie clip to red requires two lines: one to modify the copy of the color transform and one to apply the transform to the movie clip’s Color object.

  tr.rb = 255
  co.setTransform (tr)

The result on the red value of the color transform is that its original value of 0 is multiplied by 100, then 255 is added to it, making the result 255.Once the transform has been reapplied to the Color object, the movie clip changes color. Changing the same clip to blue requires you to suppress the red as well as setting the blue (and of course setting the transform):

  tr.rb = 0
  tr.bb = 255
  co.setTransform (tr)

And finally, you cna also change the alpha:

  tr.aa = 0
  tr.ab = 127
  co.setTransform (tr)

An alternative method that skips the whole transform issue is the setRGB method of the Color object. You perform just step 1 above (create a Color object associated with a movie clip), then pass the method a numeric value that represents red * 256 * 256 + green * 256 + blue. Then you’re done. Here’s an example that sets the movie clip to red:

  co.setRGB (16711680)

As John Doe notes in the final post (as of 11 May) on the thread, the Color class has been deprecated in Flash 8 (something I hadn’t noticed), and replaced by the ColorTransform object in the flash.geom package. I haven’t had to figure out how to access that from Lingo yet, though, and since you can only use it in ActionScript if the package has been explicitly included when the SWF was exported, it may pose some problems down the road.

Oregon’s Fighting 3rd

Did you miss Congressman Earl Blumenauer’s (D-OR) turn in Stephen Colbert’s “Better Know a District” segment last week? Click on the picture to watch the matchup.

Did Goss Get It In Retribution for McCarthy Firing?

Funny how quickly this followed on the firing of Mary McCarthy. Two weeks ago to the day, CIA Chief Porter Goss cans McCarthy for supposedly disclosing classified into just 10 days before she was due to retire. Now, Goss has to hurridly resign. Did someone inside have the goods on Goss?

Das Star-Spangled Banner

Tennessee Sen. Lamar Alexander introduced a resolution today joining in the hyperventilation over the Spanish-language version of “The Star Spangled Banner”. In the press release announcing his bold action, he references a Washington Post article from 28 April that says “musicologists cannot name another foreign-language version.”

Well, I’m not a musicologist, but it took me about 5 minutes to find a Google reference that wasn’t about someone bewailing the fact that the national anthem had been translated into Spanish. I found it in the Library of Congress, and although there’s no date listed on the document, it looks like it’s been around a while. From the printing style, the outfit on the soldier, and the dusky fellow in shorts, I’d hazard a guess that this might have been circulated among German-speaking recruits in the Union army during the Civil War (if I’ve copied any of the text incorrectly, please let me know, the scan’s a little fuzzy on some of the serifs and my German’s not what it should be after three years back in college).

Das Star-Spangled Banner

O! sagt, könnt ihr seh’n in des Morgenroth’s Strahl,
Was so stolz wir im scheidenden Ubendroth grüßten?
Die Sterne, die Streifen, die Wehnend von Wall,
Im tödlichen Kampf uns den Unblick verfüßten?
Hoch flattere die Fahne in herrlicher Bracht,
Beim Leuchten der Bomben durch dunkle Racht.
O! sagt, ob das Banner, mit Sternen befä’t,
Ueber’m Lande der Freien und Braven noch weht?

Director Resources Now!

With the subsumption of macromedia.com into the Adobe ‘verse and the end of updates to the 12-year-old Director Web (not to mention the fact that the announcement on Director Online still has Gary reporting from MAX 2005!) it can feel a lot like the edges of the Director fabric are getting a little frayed. Fortunately, there are people like the University of South Wales’ Dean Utian, who know how to stitch things back together. Dean has spent some time recently updating the links on his page of Director resources, making sure that there aren’t any dead links and updating links that have changed.

Bookmark for a rainy day. It may be spring in the Northern Hemisphere, but you know it’s coming…