Putting a website on CD

Hi all -

I need to put a website on a CD-Rom as part of my CalArts admissions portfolio.

I feel very, very stupid, but I cannot figure out how to do this. The problem is that I don’t know what src to use for links and images.

I figure that while C:\etc, etc will work on my computer (I can load things fine in IE 6 if I point to the graphics file on my C drive and the like), if the same .htm file says that an image’s SRC is “C:\etc\etc” on the CD-Rom, it will no longer load properly and my website won’t make a very good impression. I can’t just use my CD-Rom drive’s address because while mine is “D:”, theirs could be C, E, or Z for all I know.

Yet, I know putting websites on CD-Rom is a common practice. Ack! How do I do it?

Thanks a ton,

  • wobbly

Just put the root folder on the cd. This will maintain the integrity of the file structure. They will launch from the cd as they would launch from a pc. You could also place a auto run flash movie to browse and launch files. BUt if you take the root folder it will work regardless

Sorry to keep this going unnecessairly but I just want to make sure I do this right.

So, if I have, for instance, for a given file at:
“C:\My Stuff\CalArts\website itlebar.gif”

the src address in the actual .htm file I’m going to burn to the CD should look like
< img src="…???"
>

what exactly?

Thanks again and again!

  • wobbly

C:\My Stuff\CalArts\website itlebar.gif

lets say your html file is in your CalArts folder. and the images you need for that particular html file is in the website folder. You would only need to take the html file and the website folder and all img src would need to img src="/website/titlebar.gif". Just some advice of you IIS or PWS on your machine you should use the inetpub/wwwroot/ directories. It just makes things like simpler. It will get messy just using you c:/

I’m sorry, I don’t know what I’m doing wrong.

I changed the src to


<img src="/website/titlebar.gif">

but when I double-click the index.htm file, the title bar is just a red X broken-image placeholder. This doesn’t seem to be working :frowning:

The path I gave you before is correct (C:\etc.).

Also, I just realized none of my server-side includes are working… oops. Is there any way to make SSIs work on the CD?

Thanks for all your time and assistance.

  • wobbly

Nope on the server side includes (hence the words server side). To avoid messy situations like this you should really use Inetpub/wwwroot. HMMMMM when I do it it works for me. try puttin a dot in front of your src path so it looks like this


<img src="./website/titlebar.gif">

you are just taking the html file right? Not the folder the html file is in? In my example there should be just one folder on the cd the website folder. The html file should be in the root.

have you uploaded this to a URL and tested it? If yes and it works just take everything from that host and put it in a folder (on your system) called WEB (or whatever you want)… then put it on a cd … then you can add a redirect HTML page titled something like “LAUNCH PAGE” that will load up the index of your site.

If you dont have this uploaded and working anywhere… then when you code your links, use relative paths and put everything into one folder - as suggested by others. I have done this many times for clients and it is very easy, but if you have questions post or PM me… good luck

Peace

very good chapter on how to publish to cd in “flash mx savvy” , check it out in your bookstore or buy it :slight_smile:

glad to see you Eyez…

missed your expertise and wit…

Rev

my advice is just use a dynamic address for your stuff.

don’t give a direct file path.

for example:
C://whatever/images/whatever.gif

This is an example of a direct file path. This tells the computer exactly where the file is on your computer, or you can do it on a server by giving it the name such as:

http://www.whatever.com/whatever/images/whatever.gif

Ok. The way to give a path to this file dynamically from your root www folder would be:

whatever/images/whatever.gif

easy right? Once you have all your file paths like this. Just copy the whole portfolio to a cd, and you’re finished.

300rd post, so something maybe a bit more helpfull than the usuall hints (to get people to look on their own):
_url retrieves the location of your swf!
try trace(_url); in any swf…

so you need: (frame 1)
function swfPath(){
var lastSlash =_url.lastIndexOf("/"); //name.swf after that
var path = _url.substring(0, lastSlash+1); //everything before
return path; //returns absolute path to folder containing your swf
}

you can now use as is: button action would be
on(release){
var link = _root.swfPath();
getURl(link+“yourpage.html”);
} //with both files in same folder

or work your way in adding paths:
swf is in root of cd, html in folder called “pages”:
getURL(link+“pages/yourpage.html”)
etc…

works with loading jpg’s to btw…
helps?