-
1. Re: How to export multiple cast members at once?
SeanWilson Aug 15, 2014 7:52 PM (in response to olbertfrog)Create a new Director file and paste the following handler into a movie script (Ctrl + Shift + U) and save the file somewhere:
on mExportImages castLibIndex
nMems = castLib(castLibIndex).member.count
ix = xtra("ImgXtra").new()
mPath = _movie.path
repeat with ii = 1 to nMems
tMem = member(ii, castLibIndex)
if tMem.type = #bitmap then
tName = tMem.name
if ( tName = EMPTY ) then tName = string(ii)
PUT ix.ix_saveImage([#image: tMem.image, #filename: mPath & tName & ".png", #format: 13])
end if
end repeat
end
Download Valentin Schmidt's free Image Xtra and install the xtra ("ImgXtra.x32") and "FreeImage.dll" into Director's Xtras folder ("C:\Program Files\Adobe\Adobe Director 12\Configuration\Xtras\Scripting" or your equivalent)
Link your CST (or CXT/CCT) cast file/s to your movie with the "Link…" button on the dialog presented when you hit Ctrl + Shift + C
Open the message window (Ctrl + M) and type mExportImages(2) and hit ENTER. All the images in the second cast library should be exported, as PNG files, into the same directory as you saved you movie file into
-
2. Re: How to export multiple cast members at once?
olbertfrog Aug 17, 2014 12:10 PM (in response to SeanWilson)First thank you for your help
i must be doing something wrong, because nothing gets exported.
I tried with all and also with only one CST file just to see and same results.
http://img11.hostingpics.net/pics/948243SCREENSHOT.png
I always try to do the stuff by myself and learn new things but after a whole day of trying im getting fed up ^^
Can you bother to do it for me, its 158mo only small size and resolution bmp files (around 400 probably) and 9 audio files.
I can put that up on we transfer
please
-
3. Re: How to export multiple cast members at once?
SeanWilson Aug 17, 2014 2:43 PM (in response to olbertfrog)Put your cast files on-line somewhere and send me a link in a Private Message on this forum
-
4. Re: How to export multiple cast members at once?
olbertfrog Aug 17, 2014 3:49 PM (in response to SeanWilson)thanks just sent you a link
-
5. Re: How to export multiple cast members at once?
SeanWilson Aug 18, 2014 2:12 PM (in response to olbertfrog)Sorry, I made a mistake in the code I posted earlier. The properties passed to Valentin's ImagXtra should be strings, not symbols, so the relevant line should have read:
PUT ix.ix_saveImage(["image": tMem.image, "filename": mPath & tName & ".png", "format": 13])
I have made a little utility projector executable that automates this, and allows selection of multiple cast libraries, all in one fell swoop. It seems to export your bitmaps successfully. If you want a copy, PM me your address and I'll email it to you (~2.5MB)
-
6. Re: How to export multiple cast members at once?
olbertfrog Aug 18, 2014 4:08 PM (in response to SeanWilson)Great!
ill pm you right away

