Hi. Some of you may remember me. I used to post more often (I still lurk). In the last few years, my work has moved me further away from web/graphic design and more into film/video effects.

The main app I use is Adobe After Effects, and unfortunately I've never been able to get it to import Xara files. So I was forced to switch to Illustrator, and my participation here decreased.

After Effects works brilliantly with Illustrator files. In fact, it maintains their layers. After importing a layered file into AE, you can animate each layer separately or apply separate effects to each layer. I always wished I could do this with a Xara file. If this were only possible, I could drop Illustrator and use Xara for all my animation artwork.

Then I encountered a similar problem with Flash -- and I HAD to solve it. I had a Flash file (given to me by a client) with 100 layers in it. I needed to bring this into AE while keeping its layers intact. Luckily, I just had to bring it in as a still image -- not animated. The animation would be completed in AE.

Flash -- like Xara -- can export as an Illustrated file. So I did this and then tried to import the file into AE. I got an error message. The same error message that I got years ago when I tried to import a Xara-generated Illustrated file.

As some of you may know, Illustrator files are actually ASCII text files with a scripting language inside. So I generated two AI files: one from Flash, one from Illustrator. Then I opened them both up in a text editor and compared them (Flash exports Illustrator 6 files, so I exported the Illustrator file as a version 6 file too.)

There were quite a few differences, but after experimenting, I discovered the crucial ommissions from the Flash-generated file:

1. There's a line of code that looks like...

%%EndComments

In a Illustrator-generated file, there's another line somewhere above this line that is MISSING from the Flash-generated version. I added pasted it in, and the result looked like this:

%AI5_NumLayers: 3
%%EndComments

In the line above, I had to change the number 3 to the actual number of layers in the Flash-generated file. So the problem -- part of the problem -- is that Flash-generated AI files are missing a crucial tag that tells AE how many layers there are inside it. Interestingly, you CAN import these files into Illustrator with no problems. But they cause an error in AE. Illustrator must be able to deal with layers as it finds them in the file; AE obviously needs to know how many layers exist right off the bat.

2. Here's how a layer looks inside an Illustrator-generated AI file:

%AI5_BeginLayer
1 1 1 1 0 0 0 79 128 255 Lb
(Layer 1) Ln
0 A
1 Ap
0 O
0.0078 0.9647 0.5333 0 k
0 R
0 0 0 1 K
0 J 0 j 1 w 4 M []0 d
0 XR
332.9746 416.0508 m
332.9746 386.667 309.1533 362.8457 279.7695 362.8457 c
250.3848 362.8457 226.564 386.667 226.564 416.0508 c
226.564 445.4355 250.3848 469.2563 279.7695 469.2563 c
309.1533 469.2563 332.9746 445.4355 332.9746 416.0508 c
b
LB
%AI5_EndLayer--

Flash-generated layers looked exactly the same -- except they were missing the "%BeginLayer--" and "%AI5_EndLayer--" tags. I created a little MS Word macro (like a Photoshop action) that searched for

1 1 1 1 0 0 0

and replaced that with

%AI5_BeginLayer--
1 1 1 1 0 0 0

and a similar one that searched for "LB" and replaced it with

LB
%AI5_EndLayer--

The file imported into After Effects perfectly!

I immediately wondered if the same trick would work with Xara. But as it turns out, Xara DOES add the appropriate layer tags into the text file. So the problem had to lie elsewhere.

I opened up a Xara-generated Illustrator file in notepad. As it turns out, Xara generated AI version 7 files. The trouble turns out to be with the way Xara writes color information into the file. It MIXES RGB and CYMK values (why?!?) and this is totally unacceptable to AE. It's also pretty difficult to fix this with a find and replace. But you can fix it by opening the file in Illustrator and resaving it. Stragely, this tactic DOESN'T work with Flash files, which is why I was forced to come up with the hack.

I realize this might only interest .00001% of the people here, but I thought I'd post it anyway. If someone else had posted this a week ago, I'd have been grateful!

I know Xara isn't in active development, but fixing this problem -- so that Xara writes good AI code -- should take very few man-hours to fix. The folks a Xara, Ltd. should think this one over. It would make their program usable for a whole new group of people!

Marcus Geduld
{ email me } { visit me }