- Download the ImgXtra from Valentin Schmidt's site here: http://www.dasdeck.de/staff/valentin/xtras/image/win/d10/
- Put FreeImage.dll and ImgXtra.x32 files from the zipped pkg. into the Xtras folder of the Director application*
*Note: if running D10 then it's located somewhere like: C:\Program Files\Macromedia\Director MX 2004\Configuration\Xtras\
- Open up your .dir file and add this moviescript:
on saveImages savePath retVal = 1 -- check savePath if (not stringP(savePath)) and (not savePath contains "\") then retVal = -1 return retVal else if the last char of savePath <> "\" then savePath = savePath & "\" end if end if -- create instance of ImgXtra imgObj = xtra("ImgXtra").new() -- iterate through the Internatl Cast -- and save as bmp using the member name, -- or if empty then "member_#" m = castLib(1).member.count repeat with i = 1 to m if member(i, 1).type = #bitmap then fName = member(i, 1).name & ".bmp" if fName = ".bmp" then fName = "member_" & i & ".bmp" put "savePath: " & savePath & fName ixErr = imgObj.ix_saveImage(["image": member(i, 1).image, "filename": savePath & fName, "format": "BMP"]) if ixErr = 0 then retVal = -2 end if end if end repeat
-- destroy instance of ImgXtra
imgXtra = 0
return retVal end
4. run it from the message window, something like this:
err = saveImages(the moviePath & "images")
err will be a return value of 1 if successful, a negative number, if not... you can do this to get the value in the message window:
the moviePath is the path to the .dir file and "images" is a subfolder in the folder where the .dir file exists. Adjust the path accordingly, eg. "C:\Images" or some valid path where you want the exported images to be saved.
My Friend, Joshua, (you remind me only Joshua I knew, from the series Freinds) you are superman !!!
thank you thank you thank you soooooo much..
I can kiss you now if you are infront of me.
Thank you for your support, it worked like a charm.....
Keep smiling and keep walking, you made my day already !
Your instructions were very helpful. i have a .dir file created in 2004. i downloaded director 11 (free version) to extract all the images from the slideshow (around 60). i found your post and it was very helpful. i've downloaded the ImgXtra files etc. as per your instructions.
however, i'm kind of stuck with a script error when i run it from the message window. when i run the script from the message window, it says "Script error: comma expected"
can you please see the script below and tell me what's wrong with it?
err=saveImages(the moviePath Users\leilakarnik\movies\mystic journeys copy_test.dir, & "images" \Users\leilakarnik\movies)
Can you please edit my script so that i can run it correctly and extract the files? i'm using a mac- OS X 10.5.8
any help on this will be greatly appreciated.
You need to pass a valid path as a string.
It looks like you are trying to save the images to a folder in the user's directory... if you want to get the user's path then you will need to use something like buddyAPI to do that. See here for some info on using buddyAPI: http://www.mods.com.au/budapi_docs/baSysFolder.htm (Note: you can use up to 3 methods for free in buddyAPI; FileXtra4 from Ken Kersten will also get the system folders, and it's free. Check out the Mile High Table of Products for Xtras).
userFolder = baSysFolder("users")
err=saveImages(userFolder & "\My Pictures")
or something similar.
Thanks, will try this out.