1 person found this helpful
I saw that you posted this first in the Illustrator SDK forum - is your extension entirely written using Extension Builder, or do you have a native Illustrator plugin with a front-end written using Extension Builder?
If your extension is written only in Extension Builder then I don't think you can specify a custom menu location in Illustrator (I think you can in InDesign, but no other point products).
If you have a native plug-in and are only using Extension Builder for the front-end then you can have a menu item wherever you can with any other native plugin - see the FreeGrid and FreeGridUI samples in the Illustrator CS5 SDK for an example.
Does that help at all?
Thanks for the reply. I wasn't aware of this forum. I got to know this after I posted my question in SDK forum.
My plug-in entirely written using SDK APIs. I made a UI only using Extension Buider.
Instead of using ADM, I just want to use Extension Buider so that I need not to create UI using resource editor of any Mac or Win.
I am looking into samples as you suggested. If i'll have any prb regarding this i'll let you know.
What isn't clear from the samples is that your CSXS Extension can actually choose not to contribute a menu under Window > Extensions.
The FreeGrid sample has menu items under Window > SDK > Free Grid (that calls into the C++ code which fires off a CSXS event to open the extension), and under Window > Extensions > Free Grid UI which opens the CSXS Extension, which in turn communicates with the C++ plug-in. If you delete the <Menu> tag in the Free Grid UI extension's manifest file (under .staged-extension/CSXS) then that will get rid of the Window > Extensions > Free Grid UI menu item, leaving only the menu item defined in the C++ plug-in. This does not seemed to be supported by Extension Builder's Bundle Manifest Editor (I'll file a bug about that now), but you can manually edit the manifest file (in Extension Builder you need to click the down arrow in the top right of the package explorer and select "Filters", then deselect the ".* resources" checkbox - this will make the .staged-extensions folder visible. Then just navigate to the .staged-extension/CSXS/manifest.xml file, right click it and select "Open With > XML Editor".)
Hope that helps,
Thanks for the help. Now I getting what I wanted.
but here is a question what is the use of .as file?There is no .as file in any of sample that use flex.if it use for illustrator code then how to debug it? bcoz compiler is only compiling the main.mxml.
I think this the default behavior. There must a way to debug the .as file.
could you tell me that?
You could try taking a look at the sample extensions that come with Extension Builder - you can go to File > Import... > Adobe Creative Suite Extension Builder > Remote Creative Suite SDK Samples to get them.
CSXS Extensions can do a lot more than just act as UI for native plug-ins, they can also hook into the applications' scripting DOMs, and do anything else that an Air app can do. Extension Builder is primarily designed to let you create fully fledged standalone flash panels, so when you create a new extension it may well include stuff that you, as a native plug-in developer who only wants to use Extension builder to create a simple front end, might not want.
For the .as files - when I'm writing extensions (or any flash/air app) I prefer to write as much of my code as possible in ActionScript (so the .as files) and as little as possible in MXML. I think the sample extensions that come with the Illustrator SDK are so simple that they only contain one MXML file with ActionScript embedded in script tags. Either approach is fine, one is a little cleaner and allows you to structure your code in a nicer way, the other is simpler, you can use either approach.
Note that when you create a new extension Extension Builder generates boiler plate code for you (including the .as file you talked about). Feel free to delete that if you don't want it. It is only there as a guide, some basic code to start with, not something that you have to keep. You can structure your code however you like, you just need a .swf at the end of the day (well, and the manifest file discussed above). You can also remove the actionscript libraries if you aren't using them (e.g. the Illustrator CSAW library) by right clicking the project and going to Properties > CS Extension Builder Libraries. These libraries are for interacting with the Illustrator scripting DOM (there are InDesign, Photoshop, Bridge, ... equivalents too), and you probably don't need that here.
Let me know if you have any more questions,