View Full Version : Instance's Library Name?

08-09-2005, 01:28 PM
Is there a way I can get the name of an Instance as it appears in the library?

I know I can get the Instance name that is given to the element but say I loop over several hundred elements on the stage that are all from the Library.

I want to give them an Instance name which is the same as the Library Name but I can't see how to get that information.

Anyone have an idea how to find out an instance's library name?

Thanks, khamstra

08-09-2005, 01:32 PM
Have you tried using item.name? (for library items)

08-09-2005, 01:38 PM
That only works if your looking in the library....

I can use ".name" for elements and library items but i can't loop over

and get the library names. I can only get ".name" which gives the instance name. I want the library name of the element on the screen.

thanks, khamstra

08-09-2005, 02:06 PM
The libraryItem property of Instance (which should be available on your element if it's an instance of a library item) should hold a reference to the library item.

08-09-2005, 02:12 PM
var obj = fl.getDocumentDOM().selection[0];