[Extendflash] library.selectItem() from library's root

Morten Barklund Shockwaved morten.barklund at shockwaved.com
Tue Jan 24 16:00:22 PST 2006


Nick Kaayk wrote:
> For some reason, I have a library with multiple items with the same name 
> (in different folders).  When I call 
> library.selectItem(namepathWithNoSlashes), Flash selects one of the 
> instances in a folder, rather than the instance in the library's root. 

I can't make it do that :(

If I have one in the root and one in a folder (both named "Symbol 1"), 
no matter what I have currently selected and no matter which symbol have 
been edited latest, Flash always selects the root one.

> Is there any way I can force Flash to select the root level one?

I understand your problem though I cannot recreate it, but if it does 
that, then you could create your own function running through 
library.items, compairing names, and ensuring there is no folder of the 
item. You still cannot select this item (as there is only one 
select-method and no selected-property of Item), but you can manipulate 
the Item-object.

Pretty annyoing, but possible :)

-- 
Morten Barklund - Information Architect - Shockwaved
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174


More information about the Extendflash mailing list