Latest in Articles

Working With Silverlight: My Impressions

ActiveX Problems with Flash

Beyond the Valley of Flash - Part 1

Beyond the Valley of Flash - Part 2

Using Ant with Flash

More pages in Articles...

 

Bringing Flash to Linux


On Tuesday, I got Flash working in Linux under WINE emulation. I spent a solid work day getting an idea on how well the system functioned. Is Flash on Linux a reality? Definitely. Is it production worthy? read on...
2003-10-30

[UPDATE 2003-11-1]Michael White has responded to a couple questions. Click here to go directly there.

Yet another thing that linux can do

Monday CodeWeavers announced that they had a new version of their CrossOver Office product which would run Macromedia Flash MX on Linux. This sounded way too good to be true, especially considering my rocky past with WINE. But they said that they "supported" it, so how could I turn that down? And so I decided to attempt a full day's work in Flash on Linux.

Flash Meet Linux

It's alive!!! Alive I tell you!!

It's an unbelievable accomplishment and a testament to the dedication of CodeWeavers' programmers that they have created such a faithful replication of Windows on Linux that I can lose myself coding in Flash. CrossOver does probably 99% of what I want to do in Flash with anti-aliased pizazz. It plays sound, imports graphics, the timeline works as expected, and buttons work as expected. While I worked, I opened Flash in Windows, and it immediately recognized I was running Flash using the same serial number on Linux and promptly shut down. It's so close a replication that even the features I don't like are functionally identical!

I installed Flash once before using an older version of WINE, which is what CrossOver Office is based on. It started up, it ran, but the main problem I had were fonts. It seemed unable to find any of my fonts anywhere, except for some terrible monospace "emergency" font which was almost impossible to read. Half of the text spilled off of the widgets. And when I installed a newer rpm of WINE it just barfed up an error and exited. No biggie. I switched back to my Win2K box and moved on.

Crossing Over

Given my past experiences with WINE my experience with CrossOver Office was almost flawless. CrossOver Office is a program mainly used to ease the transition to Linux for large corporate customers, by allowing them to run windows software (mainly Microsoft Office)on linux. It fakes a Windows environment for Windows programs and installs them on a fake Windows drive. I downloaded the 30-day trial of CrossOver Office from their website and off I went. Installation was very simple, I only needed to run as root:

sh install-crossover-office-demo-2.1.0.sh

and a graphical installer guided me through the install process. Everything in CrossOver has a very windows feel to it. Not the new Fisher Price XP toolkit, but the old school "any color as long as it's gray" Win2K feel.

Once it was installed, it politely told me I should probably run Setup. The setup program allows you to install and uninstall your Windows programs, configure file associations, and other minor settings. Once you've run the first install shell script, there's little need to ever resort back to a shell prompt, which makes CrossOver a very user-friendly product.

Installing Flash

Look! It's easy! Like Hotmail!!!

Although installation of Flash was simple, it had a couple minor detours. I copied my Flash installer(.exe) over from my Windows box, clicked on the Install button in CrossOver and pointed it to the executable. It checked the installer file, noticed that it needed the Arial font, and asked me if I'd wanted to install it. I clicked yes, and it automagically connected to SourceForge, and downloaded the file. It then required something called "DCOM95" and asked if I wanted to install that. I agreed again, and it downloaded the file and installed it yet again. The Flash installer then finally came up in a new window and the installation process (EULA,Serial Number,Install Location,etc.) was exactly the same as that on Windows. It even popped up a Mozilla browser window with the Flash readme in it.

And so supposedly Flash was installed on my system. At this point I was still skeptical, as it's never been this easy. I hadn't even touched my bash shell! Give me a challenge!

Doing the Flash Dance

In my Gnome menu was a new entry,"Windows Applications". Inside was a new entry for Flash. I suspiciously clicked on it. Up came Flash. My jaw dropped. It worked. And it looks better, through beautifully anti-aliased xft fonts!

It doubled my resolve to work in Flash on Linux. I got straight to it. I opened up my .fla work file, and I received a warning that HelveticaNeue was not installed and I should choose a substitute. Great. More font problems. I searched through the FAQ and browsed my ~/.cxoffice/dotwine/fake_windows and found that I'd need to install fonts into my ~/.cxoffice/dotwine/fake_windows/Windows/Fonts directory in order for Flash to see them. Unfortunately my copy of HelveticaNeue is in PostScript, not TrueType, which is the only format that CrossOver Office can understand. I scrounged my hard drive and found a Truetype copy and installed it.

The Flash Player runs very quickly.

This wasn't good enough, because it was not exactly the same font. I ignored this problem, and got to work. I was nearing completion of my project, a cartoon short for my site, Henchfig's Codeblurbs. I merely had to debug a couple ActionScript problems, add some graphics, sound, and animation and that it. I was able to go through a lot of Flash's features quickly as I tweaked everything in. I did find numerous small annoyances, but nothing that really stopped me from actually getting my work done.


As the day progressed, I focused on my work, and even with these pesky little problems, I was able to stay focused, and completed the short without resorting to my original Windows installation.

The Fundamental Mission

CodeWeavers rates their supported application performance as either Bronze, Silver, or Gold. As Flash support has just been added, it is rated as Bronze. From the CodeWeavers' web site:

...Bronze Medal- The bronze is awarded to applications that install and run, and that can accomplish some portion of their fundamental mission. However, bronze applications generally have enough bugs that we recommend that our customers not depend on their functionality. ...

When this was brought to the attention of SlashDotters, they were feeling a bit misled by this "launch" of Macromedia support. SlashDotters are a very emotional crowd. And so Jeremy White, founder and CEO of CodeWeavers replied on Slashdot:

We have a policy to always start an application at Bronze level.

We know the reality of Wine - it can be very promising, but fail in important ways. So, we try to help our customers be cautious in their adoption. For example, Photoshop, which actually is one of the very best performing applications in CrossOver (it is in heavy use to make major motion pictures), started at Bronze, and is now only at Silver.

With that said, we have found Dreamweaver to be very complete, with only a few remaining bugs. And we have yet to find a bug in Flash... (but we didn't try as hard there).

Well, after a day's worth of work, Flash does not fail in important ways. There are some bothersome bits. Simple things that you can work around. Overall I was very pleased with the performance and in awe of the fact that I was accomplishing the 'fundamental mission' of Flash on Linux! They made it sound so exciting.

Going for the Silver

There are three main problems that need to be sorted out before Flash MX can go for the Silver.

  1. Palette order.

  2. Fonts.

  3. External data sources in the Flash Player.

Palette Order

There's a dialog under there, somewhere....

Although the system looks functionally identical to the Windows counterpart, the windowing system does behave differently and somewhat odd. Floating palettes will obscure dialogs, such as the "Publish Settings" dialog. It will appear as though the system has locked, but it hasn't, there's just a dialog hidden underneath one of your floating palettes. Three or four times I was writing ActionScript and then checking my syntax, only to find that the system wasn't responding. The Check Syntax.... confirmation dialog was underneath the ActionScript palette, and I had to press the Esc key in order to close the dialog. These windowing problems crop up rather frequently. The output window stays visible at all times, even if you switch programs. The palettes sometimes 'stick' when you switch applications. If it seems like things have locked up, press the Esc key to close any hidden dialogs.


Fonts

Why is that font so long?

Font support is phenomenally improved over earlier versions of WINE, but still not perfect. There is no PostScript support, but this is becoming less of a problem as the world moves closer to TrueType as a standard . The ability to substitute fonts is grayed out, which meant I had to manually remap HelveticaNeue button by button. Of the TrueType fonts that I've used, for some reason some of them give a height of 1600 pixels. Using these fonts for paragraph text is impossible. The only option is to choose another font.


External Data Sources

The app I was creating sends and receives XML data to a web server outside of Flash. For testing purposes Flash allows you to connect to web servers from within the Flash Player, but I've had mixed results. Sometimes it would work fine, and other times it wouldn't. If I hadn't already debugged the XML data earlier in Windows this would've required much switching back and forth between Flash and Mozilla. With Flash being used for dynamically driven web applications more than animation this will be a major hinderance to many developers.

Is It Ready For Prime Time?

My first flash creation in Linux

By CodeWeavers' own admission it's not production worthy, but its obvious that its not a long way off . If you'd like to dabble in Flash and get a feel for it you can now do it in Linux. If you are working 10-hour days in Flash then you'll probably want to hold off until the niggles are worked out.

[UPDATE 2003-11-1] Jeremy White responds

I emailed Jeremy White, CEO and Founder of Codeweavers to ask him a couple quick questions:

UG:Obviously you are in it for the long haul, what kind of timeframe do you usually have when finessing a newly supported app like Flash? Do you expect Silver status in six months? A year or longer? What kind of speed optimizations can we expect?

MW: This is really hard to predict and to give hard answers to. As far as speed, my favorite thing to say on this is: "I have not yet begun to optimize."

My goal is to have every Windows application working perfectly as soon as possible.

That's a very amibtious goal, and I don't know when we're going to get there. I am hoping to be able to accelerate it a bit next year. Being honest, our progress has been much slower than I would have liked over the past year.

So I think an honest expectation is that Flash will gradually and slowly get a bit better with each release, but that nothing dramatic will happen (unless something dramatic happens between us and Macromedia).

UG:On a somewhat unrelated note, I've also come across problems with Flash and Crossover that perhaps I can help you at least document. Do you run any sort of Bugzilla?

MW: No, but we track bugs that are sent in as tickets pretty carefully. In other words, a ticket makes a fine bug report. Of course, I suspect the techs would appreciate it if you would say 'not urgent' or something like that.

I hope you found this information useful. That's all for now! I also do bar mitzvahs.

Happy Flashing!


Other Issues and Errata

For completeness's sake I shall list here smaller problems, with some workarounds:

Palettes display in front of dialogs, causing what looks like a lock up. Press Escape to close the dialog, and move your palette out of the way temporarily.

Palettes and the Output window sometimes stay visible when switching applications.

The font remapper doesn't allow you to remap fonts, they all default to System.

Installing your own fonts is not an obvious task.

The ALT button works in all contexts. Holding down ALT before you click on an object on the stage, or many places, will enable the menu instead of modify the current behavior (usually copying or Duplicating an object or frame). ALT works fine after you've clicked on an object. If you are renaming a layer, and press ALT by accident you'll stop renaming the layer and enable the menu.

The color picker is very finicky, and won't pick up colors of objects within symbols or in bitmaps.

The Format tab under Publish Settings is blank. I kinda like this feature.

File extensions(.fla) aren't automatically added to the end of saved files.

The mousewheel will not scroll the timeline.

Scrolling the stage with the mousewheel or scrollbars corrupted my stage area, although using the hand tool worked as expected.

Checkboxes are missing from the "Update..." dialog, so you can't update multiple library items at once.

Mozilla is unable to find your "C:" drive when trying to open the help file.

Flash Player 6 for Linux in Mozilla seems to consume a lot of processing power, especially using multiple tabs. If you are working in Flash and testing your animation in the browser, keeping your browser open while you work can slow everything down. This isn't really a bug for Wine, I know, but something to think about if considering working in Flash with Linux.

Emulation performance isn't very optimized. Although CodeWeavers can fix most of the problems, they cannot vastly reduce the performance hit taken by emulating Windows. There is a noticeable slowdown in Flash, enough that will keep many professional Flash artists who need that 60 frames per second fluidity from adopting CrossOver. If I were to estimate it , I would put the speed at 60 to 75% of a comparable Windows box. Or equal to that of Mac OS 9 :).

Please note that everything that I write is based off of my short 8-10 hour usage. Within that time the program never crashed. This was installed on an Athlon 1600 w/256MB running Redhat 8.

 
 

©2004 Chris Hill. All Rights Reserved.Legal Crapola