[Extendflash] Incorporate Items from an External Library
David Crossman
dcrossman at parioonline.com
Thu Apr 6 11:15:03 BST 2006
Thanks John, you set me on the right path. For anyone else who may be curious:
currentDocumentName = fl.getDocumentDOM().name;
currentDocumentIndex = fl.findDocumentIndex(currentDocumentName);
//There has to be a better way to get current index.
seekingClip = "MyClip"; //Set by code elsewhere
var fileURL = fl.browseForFileURL("open", "Select file");
var doc = fl.openDocument(fileURL);
psLibrary = fl.getDocumentDOM().library;
var itemIndex = psLibrary.findItemIndex(seekingClip);
var theItem = psLibrary.items[itemIndex];
fl.setActiveWindow(fl.documents[0]);
fl.getDocumentDOM().addItem({x:0,y:0}, theItem);
doc.close(false);
I make no promise that this is the best way to do this, simply the first way I found. I'm sure it'll probably change as I move forward.
Have a great day!
David Crossman
Senior Programmer
PARIO, INC.
> -----Original Message-----
> From: extendflash-bounces at flashguru.co.uk [mailto:extendflash-
> bounces at flashguru.co.uk] On Behalf Of John Deans
> Sent: Thursday, April 06, 2006 5:20 AM
> To: extendflash at flashguru.co.uk
> Subject: RE: [Extendflash] Incorporate Items from an External Library
>
> Hi,
>
> This is definitely achievable. You need to open the FLAs which contain
> your external library (as often as you need access to a different
> library), and that will give you access to the library.
>
> John
>
> -----Original Message-----
> From: extendflash-bounces at flashguru.co.uk [mailto:extendflash-
> bounces at flashguru.co.uk] On Behalf Of David Crossman
> Sent: 05 April 2006 17:47
> To: extendflash at flashguru.co.uk
> Subject: [Extendflash] Incorporate Items from an External Library
>
> First time posting to the list...
>
> I'm looking for a way to open an external library and bring library items
> into the current document.
>
> Basically, I have an XML representation of my final state, and I want to
> copy into my current document, from various external libraries, only those
> items that are relevant.
>
> I can't seem to find anything through multiple Google searches and looking
> back through this list. I'm fairly new to JSFL as well, but this is core
> need of a new feature set.
>
> If I can't open and copy from an external library, how about if I used a
> starting point document that included all of the external libraries, as
> shared libraries, sorted into folders, and walked through them after
> building the new document and deleted from the library anything with a use
> count of 0?
>
> Any thoughts?
>
> David Crossman
> Senior Programmer
> PARIO, INC.
>
> 2451 Cumberland Pkwy
> Suite 3489
> Atlanta, GA 30339
>
> P 770.436.8648
> F 678.990.3658
>
> dcrossman at parioonline.com
> PARIO, INC., an award-winning interactive communications, marketing and
> learning company based in Atlanta, Georgia, offers value-added, strategic
> solutions for the creative development and multi-channel delivery of rich
> media content through film, video, television, interactive CD/DVD,
> Internet/Intranet, eLearning and courseware. PARIO, INC. is an
> 8(a), woman-owned, small disadvantaged business.
> The information contained in this electronic message is privileged and
> confidential and may be protected by the Electronic Communications Privacy
> Act, 18 US Sections 2510-2521, and is intended solely for the use of the
> individual (s) or entity addressed. The reader of this e-mail message is
> hereby notified that any dissemination, distribution, or copying of this
> communication is not authorized and is considered strictly prohibited
> unless explicitly provided for in the message content. If you have
> received this communication in error, please notify us immediately by
> return e-mailing the sender. Thank you.
>
> _______________________________________________
> Extendflash mailing list
> Extendflash at flashguru.co.uk
> http://lists.flashguru.co.uk/mailman/listinfo/extendflash
> _______________________________________________
> Extendflash mailing list
> Extendflash at flashguru.co.uk
> http://lists.flashguru.co.uk/mailman/listinfo/extendflash
More information about the Extendflash
mailing list