This content has been marked as final. Show 10 replies
You could use scriptMember.linkAs(), but dealing with a protracted
series of Save dialogs could get frustrating.
You could also create a handler to do this for you. Grab a copy of the
PRegEx xtra from < http://www.openxtras.org/pregex/> and FileXtra4 from
< http://homepage.mac.com/klkersten/xtras/FileXtra4/index.html> and try
tFolder = xtra("FileXtra4").new().fx_FolderSelectDialog("Choose a
if tFolder = EMPTY then exit
nLibs = _movie.castLib.count
repeat with l = 1 to nLibs
nMems = _movie.castLib[l].member.count
repeat with m = 1 to nMems
tMember = member(m, l)
if tMember.type = #script then
tName = tMember.name
if tName = EMPTY then
tName = "member" && m && l
tName = tName & ".ls"
tText = tMember.scriptText
OK = re_write(tFolder & tName, [tText])
-- alert "Done..."
You could also use this 'miaw xtra' (Director movie you put in Director's xtras folder)
It has three buttons:
1. Export all scripts
2. Externalise all scripts (convert embedded scripts to linked) -- use with care since it modifies the movie
3. Internalise all scripts (convert linked scripts to fully embedded)-- use with care since it modifies the movie
Yes,sorry - last minute bug. It should work now (and prompt you for a place to save the scripts)
I placed your MIAW in my Xtras folder (MX2004 on PC), I have Buddy API in the Xtras folder. When I run your script, after choosing the Save location, I get the following error:
Handler Not Defined
Unable to view script or debug. Unable to download the source movie to inspect your code (error 404). Can you help?
Thanks. Andy C.
> I placed your MIAW in my Xtras folder (MX2004 on PC), I have Buddy
> API in the Xtras folder. When I run your script, after choosing the
> Save location, I get the following error:
> Handler Not Defined
You need the PRegEx xtra from http://www.openxtras.org/ for that function.
> Instead of pushing XTRA's why has nobody not suggested using FileIO
> that comes with director.
It's simpler to use xtras other than fileIO, and in the case of large files
I can't say for certain, but from watching the activity of the fileIO xtra
it looks to me like it writes one byte at a time, whereas other xtras write
blocks of bytes, hence something like a ten-fold (the actual figure may be
different, but it's noticeable) speed increase.
It worked, creating dozens of .ls files. When I view them with a text editor, they certainly have my code, however all formatting is lost, and extra "square" symbols are all over them. Not what I was hoping for, but at least all the code is backed up in text format. I may go through and copy/paste my scripts to Word to hold proper formatting and eliminate these extra formatting characters.
> It worked, creating dozens of .ls files. When I view them with a text
> editor, they certainly have my code, however all formatting is lost,
> and extra "square" symbols are all over them. Not what I was hoping
> for, but at least all the code is backed up in text format. I may go
> through and copy/paste my scripts to Word to hold proper formatting
> and eliminate these extra formatting characters.
Try a different text editor - if you're on a PC then EditPad Lite from
http://www.editpadpro.com/editpadlite.html might get the formatting right
without the boxes.