Archive for the 'Uncategorized' Category

Old Photoshop Galleries Breaking with Flash Player 10

I have a number of old photo galleries generated from Photoshop CS2. A few of them are Flash based gallery.  Recently, I discovered that these were no longer loading and giving me a Flash Player not detected error.  The galleries in fact DO work, and if you click on the pass thru link you will arrive at a working photo gallery. But let’s be honest – what user is going to click that link?

So I started tracing the code and located the problem inside the FlashObject.js file. It’s quite comical really. The Flash Player detection code grabs a plugin description (ie: Flash Player 9.34) and then checks for the version by finding the period and selecting the character to the left. Woot!!! We have the version #.

Here was the code:

flashversion = y.charAt(y.indexOf(‘.’)-1);

Except, while that worked for versions 1-9, we now are at 10. And the above code returns a version number of zero.  So I modified the code below. It’s not the tightest code but it’s more readable.

var tmp10 = y.charAt(y.indexOf(‘.’)-2);
var tmp1 = y.charAt(y.indexOf(‘.’)-1);
if(isNaN(tmp10) == false)
{
flashversion = tmp10 + ” + tmp1;
}
else
{
flashversion = y.charAt(y.indexOf(‘.’)-1);
}

The result…Flash Player 10 is now detected. As will be other double-digit versions. And frankly, if my photo galleries are still around by Flash Player 100 – I will probably not be!

***
I am posting the revised version of this file for download for those who are not programming literate. Simply download and unzip this file and replace the old FlashObject.js from your Photoshop CS2 generated photo gallery.

Download Revised flashobject.js File

Ideas on passwords and security

I was just talking about this issue with my sys admins after being given a new fairly strong password that I will never remember. Have to keep somewhere or ask for repeatedly when needed.

I’ve long advocated multi-segmented password policies for companies.

Essentially you have a personal password plus a prefix and suffix.  Different logins would correspond accordingly.

> company prefix might be ‘wanu3′

> personal password might be ‘catpi11ar’

> site/server suffix would vary
- ‘ved3xob’ (development server)
- ‘mbx’ (mail box)
- ‘navalforce’ (ie: for salesforce)
OR a pattern (such as no vowels).
- dvsrvr3
- mlbx
- slsfrc

***

What this would do is multi-fold. First there is a generic corporate prefix. This can be changed periodically across the board. (Say once a year, or after a big layoff.)

Then there is a personal password, this makes it so that a password is unique to you.  Now in the case of system passwords, you might have a generic for this be it for a sysadmin account or a database authentication virtual user.

Than finally you have a suffix, this distinguishes each device.  It should be fairly simple and easy to remember for all devices (such as a pattern). But this helps make things more secure by ensuring that if one site is compromised (web server) they cannot simply use that password against other infrastructure elements (ie: your database). Because they’ll be different.

Essentially, you’re reducing the passwords to only three significant components. Now your users need only remember three things for all their corporate passwords. The current corp password, their personal password, and the device pattern.

B-I-N-G-O

You can have passwords that are extremely complex from a technical point to break. Symbols, spaces, numbers, etc.  While being easy enough to remember rather than being kept on sticky notes under keyboards, in drawers or text files on local machines.

- Jason

Thanks to Aral Balkan for his recent post which was the inspiration in my sharing on this topic.

Adobe AIR – “Opens a sea of possibilities!” (30onair)

If you haven’t heard… Adobe launched Flex 3 & AIR this past week.

Here is a short video I did for the 30onair. (Don’t know what that is, go to YouTube.com and search for 30onair.) ;-)

http://www.youtube.com/watch?v=l1aAnj7haDU

Crossing the language barrier

Yesterday, I encountered a surprising situation while working in Flex Builder 3 (Beta 2) on OS X (Leopard). I was working on a project that being designed to handle multiple languages. While in the code I create three simple arrays with Latin, Hebrew and Chinese characters. (See below)private var labelArrayENU:Array =
["Tools","Contents","Zoom","Magnify","Print","Save","Link","Send"];

private var labelArrayHEB:Array =
['אמצעי','תכולה','בצילום','להגזים','ספר','ש"ע','להתחבר','סלנג'];

private var labelArrayCHN:Array =
["走 狗","甘 心 情 愿","形 满 足","反 义 词","名 物 品","内 容","容 量","近 义 词"];

Image provided for those without languagesets

But something bizarre and unexpected happened when I began to create the array of Hebrew. I attempted to copy and paste the word into the array. However, when I pasted the Hebrew text at the end of the array it was moved to the beginning. Try as I might this kept happening. It dawned on me that my system has become aware of the fact that Hebrew is a “R2L” language. That means it is written from right to left as opposed to the common right to left of Western languages. (Note: I use Western as most non-modernized eastern languages write R2L.)

After some further experimentation I was confirmed in my assumption that my system had become R2L aware. First off, using the right & left arrow keys in the Hebrew text actually caused the cursor to move in the opposite direction. Now, I was concerned in part by the fact that this might be OS X acting on the text…while Flex Builder 3 remained unaware. I was concerned that my array was being constructed in reverse order. A quick test of output while looping over my array showed that while the order was being reversed in the code; the index was being reversed to correspond as well.

What I mean by this is that “index 0″ was now the right most entry instead of the left most entry. Therefore, my array outputs correctly. And the output of all three arrays corresponded to one another.

This is pretty impressive, especially in the globally connected world of our today. However, there are a few caveats. I still found it challenging to do what I want because the system makes some assumptions based on my activities. For instance, when I actually wanted to add another entry before my first entry. The system still assumed I was trying to add an entry to the end of my array and automatically moved it for me. (Which is NOT what I wanted.)

So my thoughts on this are:

a) it’s cool, and insightful to the future
b) it’s can catch you unawares and leave you momentarily confused
c) it’s still a bit quirky and can make it challenging to complete an action as you intend, even after you understand what’s going on.

Anyways, I just thought I’d share with everyone this interesting encounter. Not everyone deals with multiple languages, especially non-western R2L languages in their projects. But in case you ever do…you can be aware of this behavior which might save you some time pondering your sanity.

- The Saj

PS – I endeavored to see if this was an OS X only action by trying it in my Parallels instance of Windows XP. The action occurred there as well, but that may be from OS X’s influence.

Would love to know from a stand-a-lone Windows XP & Windows Vista user if this behavior is seen on your machine as well, or not.

Example of what not to do in Flash

Look, we have one cursor….not six! Let’s keep it that way…

Here Sprint does a great little digital mock-up of the upcoming Palm Centro. Lots of nifty “positive” effects and info. But it’s all lost by a really stupid idea to have six cursors show the user where they can click (as if “Click Here” is not enough). Nope, we want to confuse you to the point where you don’t even know which cursor is yours anymore. The effect itself is really nifty, and had they chosen something other than cursor arrows I’d have no issue.

http://www.moreyous.com/?id12=UHP_PhonesTab_092707_CentroPre


 

November 2009
M T W T F S S
« Sep    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

      Bridgeshadows "Pray for Rain"




Nxtbook Media


The Saj... "Dark Lord of the SWF"