Display files through an Applet from a jar
Hi,
My current task is to take a file structure which includes an index.html file that points to another index.html file in a subdirectory "media", the second index.html file launches one of many swf files in full screen.
I have been trying to find a solution to bundle all the swf files in the media directory, as well as the index.html file in that directory in a jar file. The entry point will be an applet, launched from the jar that will either allow or not allow the user to access the swf files depending on a certian date.
My idea was to have one index.html file and the jar file on a CD.
Is there a way to load the initial page with an applet in a browser where the user can click on a link which will load another file (within the jar) that will ultimately load the swf files (also within the jar)?
[841 byte] By [
slegeny] at [2007-9-30 19:26:28]

Theoretically possible.
//reading index.html from jar file
URL url = classLoader.getResource("index.html");
Reader reader = new InputStreamReader(url.openStream());
Results could be returned from the applet if you make a call to the applet via javascript and then the page could be rebuilt using document.write(). How is the initial applet getting started? Unbundling the SWF's from the jar is potentially going to be an issue as your using an applet.
I'm not entirely sure what your trying to do, if you could be a bit more specific.
Hi,
Specifically my result is to distribute a CD that will have high school course content in the form of swf files. Initially the CD contained one index.html with a media folder.
This index.html file points to another index.html file located inside the media folder.The second html file opens the first swf file in full screen.
I was hoping to be able to create one index.html file and one jar file containing the media folder and the swf files. This index.html file would load the applet (code found in the jar) to be an entry point to the course content. Eventually at a certian date the functionality of viewing the swf files will be turned off, so that individuals who purchase the CD will have to receive an updated one. I hope this helps.