[Extendflash]
Updating components without getting the "Resolve Library Conflict"
dialogue
Nick Kaayk
Nick.Kaayk at bbc.co.uk
Wed Aug 24 15:42:12 PDT 2005
Hello all,
My task is to write some JSFL to replace the components in a FLA's
library with the components in the componentsPanel, without getting the
"Resolve Library Conflict" dialogue ( the one that asks "One or more
library items already exist in the document:" and do you want to replace
them? ).
I have written some code to do this, described below, but it has issues
and so I am asking if there is a simpler method for an automated script
to replace components without getting the "Resolve Library Conflict"
dialogue?
Really, I guess, I want someone to tell me how to disable the "Resolve
Library Conflict" dialogue when running a JSFL script, so that I can
just replace the components in the Library.
Many thanks in advance,
Nick K.
---- description of current JSFL --
Ok, so to avoid the "Resolve Library Conflict" dialogue, currently we:
A) trawl all timelines for instances of the components to replace and
when they are found, we gather all their properties into an array.
B) loop through the array of found components and remove the instances
from their timelines. Now there are none of the components to be
replaced on any timeline.
C) delete the components to replace from the FLA's library. Now, there
are none of the components to be replaced on any timeline **or** in the
Library.
D) Now we can loop through the array of found components and repopulate
the timelines (and thus the library) from the componentsPanel, without
getting the "Resolve Library Conflict" dialogue . Yippee!
This system has two issues. Firstly, it times-out on big (hundreds of
items in the library) FLAs (which has been resolved - see my recent post
"Error Because JSFL script is running too long"). Secondly, it
sometimes crashes (it passes my unit-tests, but when I run it on real
content FLAs, it sometimes fails).
_________________________________________________
Nick Kaayk | Flash Programmer - BBC Digital Curriculum Project
Room 2376 White City | 201 Wood Lane | London W12 7TS
Tel: +44 (0) 20 8752 7592
http://www.bbc.co.uk
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.flashguru.co.uk/pipermail/extendflash/attachments/20050824/52367a36/attachment.htm
More information about the Extendflash
mailing list