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?
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
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:/
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
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:
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…