Think outside the box - adding an "images" folder to Activ E-BookMany Activ E-Book users have asked if they could use an "Image" folder in the "Source" folder directory - until now that answer has always been NO!
Activ E-Book can not compile a folder in the "Source" directory - in fact it does not recognize the existence of ANY folder in the "Source" directory.
But wouldn't it be great to store all of your images (and other files) in a separate folder. This would cut down on the confusion and clutter that happens when you are forced to stick all of your resource files in the same folder as your HTML content.
Now - "Thinking outside of the box" allows you to copy or construct your HTML content in the "Source" directory with images (and other files) stored in a separate images folder.
How is this possible? Activ E-Book has it's own Activ Script language that allows you to launch and run external "exe" programs. I thought "zipping" an images folder into a "self-extracting" zip file might allow Activ E-Book to use an "images" folder in the temp working directory. I was right!
To Make this work I created an "images" folder in the "Source" directory and moved all of my images into the "images" folder. [color=darkred](all image links in the content must then point to i.e. "images\myImage.gif" etc.)[/color] Then I used a compression program like "WinZip" to zip the "images" folder into a "self extracting" file called "images.exe". The zip program must be set to (silently) "un-zipped" the "images" folder in the current directory.
[color=darkgreen]When "images.exe" is run it reconstructs the "images" folder and all of it's files in the directory where the "images.exe" program is run.[/color]
To "run" the "images.exe" program in an eBook you must enter the following code in the Activ E-Book --
Edit\Add-Ins..\On Start Option -- [color=darkblue]##RUN('images.exe')[/color]. When Activ E-Book starts the first thing it will do is un-compress the "images.exe" file and store the images folder and all of it's files in the "temp" working directory.
One drawback of this technique is that Activ E-Book will not remove the "images" folder or any of it's files when the program closes. This will leave the "images" folder stranded in the "temp" working directory. To solve this problem you can download a special file called "DelFld.exe" DelFld.zip
To use "DelFld.exe" place it in your Project "Source" folder enter [color=darkblue]##RUN('DelFld.exe')[/color] in the Activ E-Book -- Edit\Add-Ins..\On Exit Option. DelFld.exe will then delete the "images" folder and all it's files when the eBook closes.
BTW: the Image folder must be named "images"
I hope all Activ E-Book users find this idea of useful
New Attn: The original link for DelFld.zip vanished so I added a new URL. Just unzip to get the DelFld.exe file.
Ron
(Edited by rlemire at 9:49 pm on Jan. 25, 2009)
(Edited by rlemire at 10:40 am on Jan. 26, 2009)