Comic Book
This applet allows you to create an online 'Comic Book' complete with multiple images, 'speech bubbles', and even sound files.
Downloading
The applet may be downloaded for free by clicking on the TAR-file link below (read the FAQ if you're not sure what to do with a TAR file). The FAQ also has step by step instructions on how to embed an applet into your own webpage.
ComicBook1.tar
Once unTARed, you should find the following classes (plus a '.jar' file if you want to use the archive= attribute in the <applet> tag):
- AppletUtil3.class
- AudioThread2.class
- ComicBook1ech.class
Parameters
Below are descriptions of all the parameters you may use to customize the applets to your webpages. Be sure to enclose any parameters that contain white space in double-quotation marks. Most parameters have default values in case you do not specify your own values, but the first two parameters (AUTHOR and COPYRIGHT) are necessary. If you are not sure how to incorporate an applet into a webpage (with its parameter names and values), looks at the source of this webpage and the applet embedded for an example, or read the FAQ page.
AUTHOR: This parameter must appear exactly as follows:
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
COPYRIGHT: This parameter must appear exactly as follows:
<param name=COPYRIGHT value="ComicBook applet, Copyright 1999, Eric Harshbarger">
BGCOLOR: This parameter indicates the background color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
FGCOLOR: This parameter indicates the foreground color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
FONTNAME: This value indicates the fontface used by the applet. Java1.0.2 has the following values from which to choose (must be spelled exactly): TimesRoman, Dialog, Courier, Helvetica, DialogInput, Symbol.
FONTSIZE: This value indicates the size of the font used by the applet.
FONTSTYLE: This value indicates the style of the font used by the applet. The value should be one of the following: plain, bold, italic, bolditalic.
URL: The web address of the page that is spawned if the applet is clicked upon.
TARGET: The browser frame in which the spawned URL will appear. The default is "_self".
BUBBLE.#: This is a series of parameters (BUBBLE.0, BUBBLE.1,...) used to define comic bubbles that will be used/drawn in the ACTIONs. The parameters' values should be in the following format:
<param name=BUBBLE.0 value="type | direction | x | y | message | fontname | fontstyle | fontsize | fg_color | bg_color">
- type == 'speech', 'thought', 'narrative', or 'stick' (determines the shape of the bubble)
- direction == 'northeast', 'southeast', 'southwest', or 'northwest' (indicated the direction of the bubble)
- x & y == the coordinates of the origin of the bubble
- message == The phrase to be placed in the bubble. Multiple lines are separated by the LINEBREAK character.
- font characteristics are used if the message is to be in a font different than that defined by FONT-parameters'
- fg_color & bg_color define the color of the bubble if it is to be different than that of FGCOLOR and BGCOLOR. If you use these characteristics, then you MUST include font characteristics for place holders.
IMAGE.#: This is a series of parameters (IMAGE.0, IMAGE.1,...) used to define images that will be used/drawn in the ACTIONs. The parameters' values should be in the following format:
<param name=IMAGE.0 value="path_to_image | x | y">
X & Y indicate the upper left corner of the image when it is drawn; if omitted both coordinates default to 0.
SOUND.#: This is a series of parameters (SOUND.0, SOUND.1,...) used to define audio clips that will be played in the ACTIONs (read the FAQ about what audio formats are accepted by Java). The parameters' values should be in the following format:
<param name=SOUND.0 value="path_to_sound">
ACTION.#: This series of parameters (ACTION.0, ACTION.1,...) actually tells the applet what to do (and in what order). Examples format of ACTION parameters:
<param name=ACTION.0 value="command() | command() | ... | command()">
<param name=ACTION.1 value="command()">
'Commands' are one of the following:
- drawBubble(#): Draws BUBBLE.#
- drawImage(#): Draws IMAGE.#
- playAudio(#): Plays SOUND.# (if the AudioClip has been completely loaded).
- loopAudio(#): Loops SOUND.# (if the AudioClip has been completely loaded).
- stopAudio(#): Stops SOUND.#
- wait(#): Waits # milliseconds before going to the next command.
- goto(#): Returns to ACTION.# for the next set of commands.
- showDocument(URL target): Opens a new webpage from URL in browser frame 'target'.
As exampled, a single ACTION prameter may contain a series of commands (which will be executed in order). However, the applet only repaints at the end of a particular ACTION parameter. After all the commands in one ACTION parameter are executed, it proceeds to the next (#+1) ACTION unless there are no more ACTIONs (at which point it stops).
LINEBREAK: The is the character that defines separate lines in the message of a BUBBLE. The default is the backslash character (\). If, however, you actually want to display such a character, you may redefine the LINEBREAK to another character.
DELIMITER: In all of the parameters above which use a pipe-symbol (|) to separate various arguments and terms, this parameter may be used to define a different separator (in case you want to use the | symbol in a message of a bubble or something).
APPLET DEPOT:
INTRO
-
NEWS
-
APPLETS
-
DEMOS
-
CUSTOM
-
FAQ
-
EMAIL
The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2002 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.