Thursday, January 31, 2008

Flash Panel Installation (issues)

I've been running Organify2 and ArcTwister side by side now for a couple of weeks, and I am loving the added flexibility they offer in my production. 
 
I very much want to transition all my scripts to the new Flash Panel format, but I've run into a few issues along the way.  Personally, I think the panels are well worth the headache,  but I'm afraid the average user may give up early because it's not one-click simple.   I will go over the details here, so you'll know what to expect, and what to do about it.
 
Panel installation is generally as follows. You put the .swf file in your scripts directory, and put the .jsx file anywhere you want, outside of your illustrator folder. (I'll explain why below.) You may then double click on the jsx file to run the flash panel. Now, on to the issues...
 
1) When running a .jsx script outside of the scripts folder, Adobe pops up a warning:
 
You are about to run a script in Adobe Illustrator CS3. You should only run scripts from trusted sources. Do you want to run the script?
I don't understand how the panel is any more of a threat than any of the files in the scripts folder that illustrator DOESN'T warn you about. Illustrator should at least give the user the chance to "OK" the file so the app doesn't pop up a warning dialogue each time the script gets initialized. 
 
2) If this is your first time running the script, then you'll get ANOTHER warning:
 
 Adobe Flash Player has stopped a potentially unsafe operation.

The following local application on your computer or network:
/Application/Adobe Illustrator CS3/Presets.localized/.../FlashPanelInQuestion.swf

is trying to communicate with this internet-enabled location:
<unknown>

To let this application communicate with the internet, click Settings.
You must restart this application after changing your settings.
 
If I were an end user, that would scare the piss out of me. "What does it mean? What is it trying to do? Ack! spyware, virus, Trojan, worm, rootkit oh My!!!"
 
I don't know why this warning comes up, and I don't know what the swf is trying to communicate with that is so scary since flash ITSELF is an "internet enabled" program. Regardless, it brings up the Flash Security Settings Page" in your browser, and you can set the script (or directory) as OK to run.  Now, finally, you should be able to instantiate your flash panel.
 
"So then why not just run the script from the script directory, like you're supposed to?",  you ask...  Well, if you run the file from the script directory, then you can only run a single flash panel at a time. When you try to launch a second panel, you'll get the alert:

Error: FlashPanel is already running

Starting the panels by manually double clicking on the jsx files outside of the illustrator directory bypasses the issue. You'll get the "You are about to run a script" warning, but now you may create as many Flash panels as you like. In fact, you can run multiple copies of the same panel, although I'm at loss right now as to why someone would want to. I know there is a way to run ALL your panels in the same flash meta-panel, but in my experiments, there is no simple way for users to attach individual jsx files.
 
Today I got all excited about automatically launching panels at startup, which works fine for normal .jsx files, if you create a "Startup scripts" folder in your main Adobe Illustrator CS3 directory.  Unfortunately when you do this for a flash panel, the panel is instantiated as a separate window from the main illustrator app, so when you click on your document, the flash panel disappears behind the Illustrator application, rendering it more of a pain than it's worth.  And to further ensure that the panels never get used in this way, as I mentioned above, you cannot put more than one flash panels' .jsx file in the startup scripts folder, otherwise you get the "Error: FlashPanel is already running" warning.
 
If you've made it this far, and you're still interested in using the flash panels, then the worst is over. The last point in this list is just a minor nuance that you will want to know about when using the panels.
 
3) When the panel is focused, Illustrator is NOT.
This is frustrating in that the flash panel does not work like other palates in illustrator. If you click the panel, then the panel has focus. You can use it to manipulate the art in Illustrator, but you cannot use keyboard shortcuts until you return focus to your document. This is most noticeable when you want to undo a transform using Cntl-Z. You can still undo anything done by the flash panel, but not until you return focus to the illustrator app. (by clicking on it) A minor annoyance, but hardly a show stopper.
 
Now you know what I know about installation issues. I will add notes to the "comments" section of this post if I run in to anything new.
 
I'll end on a positive note.
One never knows how ones actions will effect the world, (unless of course they send you emails and tell you.) ... (Hint, hint...)
I've gotten feedback from some people using my scripts in the medical research field.  It is a tremendous inspiration to me that in some small way I am able to contribute my skills towards scientific discovery. Thanks for the positive feedback.
 
as always, happy Illustrating...
-J

1 comment:

Unknown said...

I have worked with similar concepts and other scripting formats and found that after the introduction of CS Adobe changed how Illustrator handles external controls. I assume that you will have similar problems with triggering actions as I do. Where the action won't run until Illustrator's window gets focus again. This becomes a pain when you are trying to use actions to overcome missing functionality in the scripting, like changing colormode.

Bob