Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-09-2005, 01:28 PM   #1
khamstra
Registered User
 
Join Date: Jul 2001
Posts: 90
Default Instance's Library Name?

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
khamstra is offline   Reply With Quote
Old 08-09-2005, 01:32 PM   #2
jjbilly
Senior Member
 
Join Date: Mar 2005
Location: Oxford UK
Posts: 480
Default

Have you tried using item.name? (for library items)
jjbilly is offline   Reply With Quote
Old 08-09-2005, 01:38 PM   #3
khamstra
Registered User
 
Join Date: Jul 2001
Posts: 90
Default

That only works if your looking in the library....

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

ActionScript Code:
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements
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
khamstra is offline   Reply With Quote
Old 08-09-2005, 02:06 PM   #4
jjbilly
Senior Member
 
Join Date: Mar 2005
Location: Oxford UK
Posts: 480
Default

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.
jjbilly is offline   Reply With Quote
Old 08-09-2005, 02:12 PM   #5
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

ActionScript Code:
var obj = fl.getDocumentDOM().selection[0]; trace(obj.libraryItem.name)
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:53 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.