DRAGRI User Manual

Go to index>>

Setting segmented loading




Dividing content into segments

A large content file takes a long time to download, which can frustrate the viewer. While it is being downloaded, a "DRAGRI Loading" message will appear. Showing a background color with <param name=bgcolor> or displaying some message with <param name=message> may ameliorate the situation slightly, but you can entertain or update the viewer by using segmented loading.

First, you must divide an item of content into the loading part and the main part.

The loading part is a compact content file that can be downloaded quickly. The following example, an image of "Loading…" is superimposed on a background in shades of navy blue. Autoplay and Jump events make the "Loading…" continue to blink. (For details, see "Setting events".)

Here, a link event is defined. The directory name of the main part (in this case "main") should be entered in the URL field, and the event target (in this case "load") should be entered into the target field.


The main part of the content is stored in the subdirectory "main" (the name specified in the link event), which is within the directory where the loader is stored. For example, if the loader is stored in loader/, and the main part in loader/main/, then the directory structure will be as shown below.

loader
index.html
dragri.jar
i0.jpg
i1.jpg
dragri.txt
main
dragri.txt
v*.txt
*.jpg
*.gif
*.au

Note that the html files within main/ are not referred to. Instead, the html files within loader/ are displayed on the web page.

Make sure that the width and height attribute values of <applet> in loader and in main are the same.

Also note that, if an item of content in main/ loads another item of content, the reference directory is not main/ but loader/.




Loading content

Loading from a link event

As described above, if "load" is specified as the target of a link event, an item of content as specified in the URL field is downloaded, and when the loading is completed, the content is replaced.

Loading from JavaScript

Content loading can also be triggered by calling the method "load ()" of a Java applet using JavaScript. For related information, see "Interoperating with JavaScript".

Example

<APPLET width=320 height=240 code="Dragri.class" archive="dragri.jar" name="dragriapplet">
<PARAM NAME=PRELOAD VALUE=TRUE>
<PARAM NAME=BGCOLOR VALUE="FFFFFF">
<PARAM NAME=MESSAGE VALUE="DRAGRI Loading">
</APPLET>
<P>
<A href="javascript:dragriapplet.load('main')">[Play main]</A>
NTT Advanced Technology Corporation