Italo Calvino – The Flash

I’d never heard of Italo Calvino before today – but I thought this was pretty special, and I’d like to read more of his work. Perhaps you will, too:

It happened one day, at a crossroads, in the middle of a crowd, people coming and going.

I stopped, blinked: suddently I understood nothing. Nothing, nothing about anything: I did not understand the reasons for things or for people, it was all senseless, absurd. I laughed.

What I found strange at the time was that I had never realized before; that up until then I had accepted everything: traffic lights, cars, posters, uniforms, monuments, things completely detached from any sense of the world, accepted them as if there were some necessity, some chain of cause and effect that bound them together.

Then my laugh died. I blushed, ashamed. I waved to get people’s attention. “Stop a moment!” I shouted, “there is something wrong! Everything is wrong! We are doing the absurdest things. This cannot be the right way. Where can it end?”

People stopped around me, sized me up, curious. I stood there in the middle of them, waving my arms, desperate to explain myself, to have them share the flash of insight that had suddenly enlightened me: and I said nothing. I said nothing because the moment I had raised my arms and opened my mouth, my great revelation had been as it were swallowed up again and the words had come out any old how, on impulse.

“So?” people asked, “what do you mean? Everything is in its place. All is as it should be. Everything is a result of something else. Everything fits in with everything else. We cannot see anything wrong or absurd.”

I stood there, lost, because as I saw it now everything had fallen into place again and everything seemed normal, traffic lights, monuments, uniforms, towerblocks, tramlines, beggards, processions; yet this did not calm me, it tormented me.

“I am sorry,” I said. “Perhaps it was I who was wrong. It seemed that way then. But everything is fine now. I am sorry.” And I made off amid their angry glares.

Yet, even now, every time (and it is often) that I find I do not understand something, then, instinctively, I am filled with the hope that perhaps this will be my moment again, perhaps once again I shall understand nothing, I shall grasp the other knowledge, found and lost in an instant.

PS3 XMB Wave in Flash / AS3

My second attempt at recreating the PS3 XMB “wave” thingy in Flash – I’m thinking it’s not too shabby for purely using blurred 2D lines for the waves. I’m sure it could be fine-tuned to match up with the real XMB better, but for what I wanted this is fine.

And all using zero 3D, and zero splines/beziers.

Not bad for 7KB of Flash!

PS3 Wave in ActionScript 3 / Flash

I had to cover a class on Flash today, and I haven’t touched it in over a year, so I got up bright and early to make sure I wasn’t too rusty…. and yeah… I was. Really rusty.

I was thinking in C++ and Python and Java, not thinking in AS3 and everything was wrong – so I decided to write a PS3 XMB (Cross Media Bar) “Wave-Thing” as practice. In fact, it doesn’t even do the waves – just the sparkles. Still, was a good exercise to get my head back in the game.

There’s nothing to stop me implementing the waves as fixed DisplayObjects moving in parallax (easy, weak), or via blurred splines (preferred, harder) – but at least I got the sparkles, um, sparkling…

I think I will do the waves, I need some spline practice…

Update: Modified so spark is allocated to MC with one of four levels of blur, increased spark density, spark has 50% chance of pulsing again without being re-initialised, spark has 1% chance of being big on initialisation.

Credits: PS3 wave background from: http://blog.guifx.com/2009/04/24/playstation-3-wallpapers/

How To: Partially workaround Adobe Flash plugin issues on Linux

Update: Update/fix at bottom of post…

Flash on Linux has always been a mess, especially on 64-bit, so when I upgraded my flash plugin the other day to the latest 11.2 beta I wasn’t in the least bit surprised when it broke. This time, watching videos with people in them had the people looking like they were from Avatar – all the skin was blue, and in general the colours were well off. For example:

Flash Red/Pink Colour Issue
Flash being, well, Flash...

To fix this up, you need to twiddle with the flash settings at /etc/adobe/mms.cfg, or if you wanted to, do the twiddling through the Flash-Aid plugin like below (in my final working config I actually use the top option of GPU validation as enabled and disable VDPAU):

Flash Plugin Acceleration Options
Flash Plugin Acceleration Options

Once that’s done, restart your browser and hey-presto – correct colours in Youtube:

Flash Colours Restored
Flash Colours Restored

You may have to turn on or off some combination for it to work with your particular machine in a trial & error style, because what might work in YouTube might crash when using other flash video sites (vimeo, gametrailers etc). After some playing around, I’ve decided to live with the bad youtube colours and use the following settings in the /etc/adobe/mms.cfg config file:

And as I’m a curious lad, I thought I’d make a table of what works and what doesn’t (on my setup – LMDE w/ NVidia 290 drivers):

Firefox 5.0
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Works Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Works Crashes browser Crashes browser
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad Colours Works Works

Chrome 16.0.912.63
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Crashes plugin Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Crashes tab Crashes tab Crashes tab
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad colours Works Works

Looks like there’s no clear winner that works for everything… Oh wells, there’s a good write-up with alternate solutions and things over on WebUpd8 here – even though they talk about flash 10.2 on Ubuntu, this is the first time I’ve had this issue and it’s on LMDE (Debian based) with the flash 11.2 beta and the same fixes work here. I guess if you’re that bothered, you could always downgrade to some previous flashplugin (like something from the 10.x series) and see how that holds out.

But on the upside, it’s kinda funny watching things in Avatar mode =P

Avatar Flash

Update: You can fix the bad colours in Flash 11.2.202.221 by setting the following options in /etc/adobe/mms.cfg:

With NVidia 295.20 drivers (although I’m not sure if that’s part of the problem) Flash video plays fine without any colour issues. Hurrah! =D

An introduction to ActionScript 3.0 – Week 9 – Sound

In the final week of the ActionScript intro we get into using sounds with ActionScript, and play audio which is external to our flash file(s), embedded within our flash files as well as covering topics like offsetting and repeating. We also create our own custom pause function (because weirdly, the functionality isn’t natively available).

Flash Sound Document

This wraps up all the ActionScript stuff I taught over a brief course about a year ago, and I’ve got to say, I didn’t mind ActionScript 3 as a language at all. You can do a lot of nice bits and pieces with it which can be embedded directly on the web, or you can use it for some quick prototyping (although if you were prototyping some serious effects, you’d probably be more likely to do so in the processing language), so yeah. Glad I spent a month or so getting my head around it.

Download link: An Introduction to ActionScript 3.0 – Week 9
Audience: Beginners who know a little about variables, functions, objects and how to perform some basic programming math.
Format: PDF
Content License: The document, its contents and the provided source code are released under a creative commons non-commercial attribution share-alike 3.0 license by me (r3dux) and comes with no guarantee of correctness, fitness for purpose or anything of the sort. The audio samples used are the property of their respective owners and are used under a fair-use type of deal.

If you’ve followed the series of posts over time, or just stumbled across one week’s worth of notes and found it useful, then I’m happy I went to the effort – and if you’ve learnt something from them then even better ;)

Cheers!