home *** CD-ROM | disk | FTP | other *** search
- ImageButton 2.05 instruction file
-
- -----------------------------------------
-
- What this applet is:
- This applet is a general multi purpuse button.
- The applet is capable of creating a number of buttons on a panel.
-
- -----------------------------------------
-
- INSTALATION :
- 1: Insert the applet tags such as discribed below in your html file.
- 2: Upload the ImageButtun2.class file and your html file to the
- providers computer.
- 3: Also Upload the necessary sound and image files.
-
- -----------------------------------------
- The applet tags:
-
- <APPLET code="ImageButton2.class" height=310 width=120>
- This is the starting tag of the applet.
- CODE tells the browser only the name of the class file.
- Not the place.
- Normaly the browser expects the classfile in the same directory
- as the html file.
- If you want to change this use the codebase attribute.
- Note that codebase also changes the place where the buttonpictures
- and other files are expected to be.
- HEIGHT this is the applet height in pixels.
- WIDTH this is the width of the applet in pixels
- This tag can't be omited.
-
- <PARAM NAME="loadmessage" VALUE="Loading please wait">
- This parameter lets you display a message on the applet
- while the images and sound files are being loaded.
- If you omit this tag the text will be loading.
-
- <PARAM NAME="direction" VALUE="vertical">
- This is the how the buttons are alligned.
- Also possible = "horizontal" .
- This tag can't be omited.
-
- <PARAM NAME="bgcolor" VALUE="#FF0000">
- This is the color of the panel.
- If omited the color will be black.
-
- <PARAM NAME="background" VALUE="someImage.jpg">
- You can use a background image for the applet.
- If omited no background image will be used.
-
- <PARAM NAME="numberoffbuttons" VALUE="4">
- The applet does not automaticly check the number of buttons.
- This parameter tag can't be omited.
-
-
- NOTE: Next comes a serie of tags to set default values.
- These default values are used to reduce the loading time
- and or reduce the number of tags.
- For example if all the buttons in up position look the same.
- Then you specify one default button up image.
- You then don't have to specify the button up image multiple times.
- This reduces the number of tags.
- Also the amouth of data loaded by the applet is reduced.
- Because only one button up image is loaded in stead of mutiple.
- (The applet will sartup faster)
- But what if one of that button up image must be different.
- You still can use the default tag.
- But later on you specify a specific button up image for the different
- button.
- This overrrides the default image.
- You can overide all default values.
-
-
-
- <PARAM NAME="button_up_default" VALUE="pictures/button_up.jpg">
- <PARAM NAME="button_above_default" VALUE="pictures/button_above.jpg">
- <PARAM NAME="button_down_default" VALUE="pictures/button_down.jpg">
- These are the default images used for the button.
- The first if the button is up.
- The second when the mouse is above the button.
- The third when the button is pressed.
- All these three tags can be omited.
- If omited no default image is selected.
- Note: All button UP images must be specified by default or by the
- specific button tag.
- Because they are used for the layout of the panel.
-
- <PARAM NAME="button_x_default" VALUE="10">
- You can determine the layout manualy.
- This one aligns all buttons to 10 pixels from the
- left side of the applet.
- If omited the applet do the layout for you.
-
- <PARAM NAME="button_y_default" VALUE="10">
- You can determine the layout manualy.
- This one aligns the buttons 10 pixels from above.
- I omited the applet will use it own layout manager.
-
- <PARAM NAME="text_color_up_default" VALUE="#FFFFFF">
- <PARAM NAME="text_color_above_default" VALUE="#FFFF00">
- <PARAM NAME="text_color_down_default" VALUE="#FFFFFF">
- These are the default colors of the text on the buttons.
- The first if the button is up.
- The second when the mouse is above the button.
- The third when the button is pressed.
- All these three tags can be omited.
- If omited that default color will be black.
-
- <PARAM NAME="text_type_up_default" VALUE="1">
- <PARAM NAME="text_type_above_default" VALUE="1">
- <PARAM NAME="text_type_down_default" VALUE="1">
- These are the default text type of the buttons.
- The first if the button is up.
- The second when the mouse is above the button.
- The third when the button is pressed.
- Possible are 0=plain 1=bold 2=italic and 3=italic and bold.
- All these three tags can be omited.
- If omited that default type will be plain.
-
- <PARAM NAME="text_height_up_default" VALUE="12">
- <PARAM NAME="text_height_above_default" VALUE="12">
- <PARAM NAME="text_height_down_default" VALUE="9">
- This is the default height of the font
- The first if the button is up.
- The second when the mouse is above the button.
- The third when the button is pressed.
- All these three tags can be omited.
- If omited that default heigth will be 12.
- So in this example the first and second tag can be omited.
-
- <PARAM NAME="defaultfont" VALUE="Dialog">
- Only one font can be set.
- If the browser doesn't support this font the browsers
- default font will be used.
- Some other common fonts are: "TimesRoman",
- "Courier", "Helvetica".
- Note:Watch the lettercassing of these names.
- Java is case sensitive.
- If omited the borwsers default font will be used.
- Note:Some computers use as default the Dialog font.
- This font only can be sized in steps.
-
- <PARAM NAME="sound_up_default" VALUE="geluiden/exit.au">
- <PARAM NAME="sound_above_default" VALUE="geluiden/above.au">
- <PARAM NAME="sound_down_default" VALUE="geluiden/down.au">
- This are the default sounds of the buttons.
- The first if the button goes to the up position.
- The second when the mouse is enters the button.
- The third one when the button is pressed.
- All these tags can be omited.
- If omited no default sound is selected.
-
- <PARAM NAME="wait_for_sound_default" VALUE="2000">
- This lets the browser wait before loading the url.
- The browser waits so the sound of a pressed button can
- be played properly.
- If the sound is playing and the url is loaded the sound can
- be distorted.
- Also when waiting the button will stay down.
- If omited the browser this default value will be 0.
- (The value is in milliseconds)
-
- <PARAM NAME="target_default" VALUE="right">
- This is the default frame.
- The applet can be used on html pages with frames.
- "right" is in this case the name of the frame.
- If omited no default frame will be set.
-
-
- NOTE:Above is explained how the default tags are set.
- Default tags set the default values,images or sounds for the buttons.
- For each button you can override the default values.
- This is done by the specific tags.
- Just replace the "....default" in the parameter name with
- the button number.
- But first I will explain the specific tags where the you can't
- set a default value for.
-
- For example if you want to set a specific color for button number
- three.
- <PARAM NAME="text_color_up_3" VALUE="#0000FF">
- <PARAM NAME="text_color_above_3" VALUE="#00FF00">
- <PARAM NAME="text_color_down_3" VALUE="#125354">
- or use other sounds for button three
- <PARAM NAME="sound_up_3" VALUE="geluiden/othersound.au">
- <PARAM NAME="sound_above_3" VALUE="geluiden/somesound.au">
- <PARAM NAME="sound_down_3" VALUE="geluiden/blabla.au">
- or even just some other buttonImages
- <PARAM NAME="button_up_3" VALUE="pictures/otherButtonImage.jpg">
- <PARAM NAME="button_above_3" VALUE="pictures/anotherImage.jpg">
- <PARAM NAME="button_down_3" VALUE="pictures/someOtherImage.gif">
- Remember Just simple replace the default word with your button number.
-
-
- <PARAM NAME="url_1" VALUE="java.html">
- This sets the url (=internet adress) where the browser will jump to
- when clicked on button one.
- For button 2 replace "url_1" with "url_2" and so on.
- If omited no url is used.
- This applets supports relative and absolute urls.
- Also html frames (target parameter tag).
- Also it support html anchors.
- Note: an anchor must be preceded by a html filename.
- If this tag is omited the button will not use an url.
-
- <PARAM NAME="statustext_1" VALUE="Back to the Java index.">
- This set the text that must be displayed on the statusbar.
- The text is displayed when the mouse is above the first button.
- If you wont the statustext set for the second button replace the
- "1" with "2" and so on.
- This tag can be omited.
- If omited the browser will display the url.
- If omited and no url is selected the browser not display a statustext.
- Also if the Value="" no statustext will be displayed.
-
- <PARAM NAME="text_up_1" VALUE="BACK">
- <PARAM NAME="text_above_1" VALUE="java index">
- <PARAM NAME="text_down_1" VALUE="java index">
- It is also possible to write a text on the button image.
- Offcourse there can be no default values set for this.
- These parameters can be omited.
- If omited no text will be displayed.
-
-
- <!-- button 1 -->
- <PARAM NAME="text_up_1" VALUE="BACK">
- <PARAM NAME="text_above_1" VALUE="java index">
- <PARAM NAME="text_down_1" VALUE="java index">
- <PARAM NAME="url_1" VALUE="java.html">
- <PARAM NAME="statustext_1" VALUE="Back to the Java index.">
-
- <PARAM NAME="target_1" VALUE="">
- If a default target is selected and you don't want a target for this button
- Then set the value to "".
-
- <PARAM NAME="button_x_1" VALUE="0">
- <PARAM NAME="button_y_1" VALUE="0">
- This puts the first button in the upper left corner.
- With these parameters you can layout the buttons yourself.
- Remember don't put any buttons above each other.
- This x and y are the coordinates of the upper left corner of the button.
- If omited the applet will layout the buttons.
-
- <!-- button 2 -->
- <PARAM NAME="text_up_2" VALUE="FEATURES">
- <PARAM NAME="text_above_2" VALUE="Features">
- <PARAM NAME="text_down_2" VALUE="features">
- <PARAM NAME="url_2" VALUE="ImageButton2_features.html">
- <PARAM NAME="statustext_2" VALUE="look what this applet can do.">
-
- <!-- button 3 -->
- <PARAM NAME="text_up_3" VALUE="THE TAGS">
- <PARAM NAME="text_above_3" VALUE="Tag Example">
- <PARAM NAME="text_down_3" VALUE="the applet tags">
- <PARAM NAME="url_3" VALUE="ImageButton2_tags.html">
- <PARAM NAME="statustext_3" VALUE="See an example of the applet tags">
-
- <!-- button 4 -->
- <PARAM NAME="text_up_4" VALUE="DOWNLOAD">
- <PARAM NAME="text_above_4" VALUE="ImageButton2">
- <PARAM NAME="text_down_4" VALUE="download">
- <PARAM NAME="url_4" VALUE="construction.html">
- <PARAM NAME="statustext_4" VALUE="Download ImageButton2.zip (zipfile includes more information)">
-
- </APPLET>
- This is the closing tag of the applet.
- No more applet tags will follow.
-
- -----------------------------------------
- HINTS :
-
- 1. if you have set all the default images and want one button not to change.
- for example button 3. overide the above and down image of this
- button to the same as the up button.
- <PARAM NAME="button_up_default" VALUE="pictures/button_up.jpg">
- <PARAM NAME="button_above_3" VALUE="pictures/button_up.jpg">
- <PARAM NAME="button_down_3" VALUE="pictures/button_up.jpg">
-
- 2. You can use this applet as a button ruler.
- set direction to horizontal.
- Make sure that the sum of the button width equals the applet width.
- Then you hav a horizontal line of buttons in your page.
- You can't attach local links to the buttons.
- Something like <a href="page.html#middle">
- As far as I know local links aren't supported by the current
- Java versions (1.02).
-
- 3. The applet doesn't have to be used with html frames.
- It can be used with frames
-
- 4. You also can use an url to another place
- in the same page.
- something like http://www.somesite.html#anchor555
-
- 5. You also must think that some browsers doesn't support java.
- Then any ordenary html tags between the applet start and endtag is executed.
- So you can set an imagemap or a list of html links between them.
- They will not be executed if the browser supports Java.
- (Allmost every browser supports Java but not all !! )
-
- 6. There is an advanced feature.
- It is possible to do a tag like
- <PARAM NAME="button_up_4" VALUE="=3">
- This means that the up image of button 3 is copied to
- the image of button 4.
- This also reduces the loading time.
- It is possible for the up down and above images.
- NOTE: this only works backwards.
- for example coping image 6 to 5 doesn't work.
- This can be useful if you have two or more different kind
- of button sets on your page.
-
- 7. Its also possible to let the button open a new html page
- in a new browser window.
- Just use a non existing html frame name for the target parameter.
-
- 8. It is possible to create a table with buttons.
- You can set the coordinates of the buttons manualy.
- This maces it possible for you to determine the
- layout manualy.
-
- 9. You also can use a two status button.
- Just omit the down images of the button.
- If the applet doesn't find an down image it will
- try to use the above image.
- So if there is now image for a pressed button it
- will try to use the mouse above one.
-
-
- -----------------------------------------
- DISCLAIMER :
- By using this applet you accept the maximum claim you can make
- is equal to the amount you paid to us for this applet.
- This is so because of the low price of the applet.
-
- -----------------------------------------
- BUGS:
-
- -1: The Dialog font can only be sized in big stepes.
- This is not caused by the program but by the operating system.
- The dialog font can be the default font of the browser.
- Solution set another defaultfont with the applettag.
-
- -2: If you use an one color gif file as an button this can cause
- an IO error.
- This only occurs if the picture is a gif89 format.
- Solution convert it to a standard gif87 picture.
-
- -3: Netscape dithers gif files to 125 color pallet.
- This is not caused by the applet but by the Netscape browser.
-
- -4: Transparent gifs with Java applets are not correctly supported by Netscape.
- Sometimes they are not completly drawn.
- This is a bug in the Netscape browser.
-
- -5: Transparent gifs on Explorer aren't supported correctly.
- There is a differance if you draw text on the button.
- If you draw text on the button the background color of the applet
- will be displayed.
- If you don't draw text on the button the background image will be displayed.
- (if you use one).
-
- -6: if you use anchors within the url it will not work properly
- on a Explorer 4.0.
- I fixed the anchor bug of the explorer 3.0x but now the anchor don't work
- correctly on the explorer 4.0.
-
- -7: if you use the mailto protocol in the url it will not work with the
- Explorer 3.0.
- This is caused by a bug in the Explorer 3.0
- It probably will work on the explorers 3.01 and 3.02.
-
- -8: setting an applet size wit a percentage in the applet tag
- will not work in the explorer 3.0
- This is fixed in the later versions of this browser
- So don't use an percantage to set the applet size.
-
- BUGFIX:
- -1: Ms Internet Explorer 4.0(beta) relative addressing didn't work correctly.
- The cause was a bug within the browser.
- Version 2.01 has a workarround added for this problem.
-
- -2: version 2.02
- Netscape communicator nullpointer exceptions did occur on the statusbar
- when the browser starts and the mouse is above the applet.
- It is caused because the browser acts a little diferrent from the previus versions.
- Netscape did put a routine in the browser that catches these exceptions.
- A workarround has been added.
-
- -3: version 2.03
- An error in the loading of the applet background image has been fixed.
-
- -4: version 2.04
- When correcting the bug of version 2.03 a bug appeared on the Explorer 3.0 and
- Netscape 3.x
- The background then on these browsers didn't appear.
- It has now also been corrected for these browsers.
-
- -5: version 2.05
- The background image now isn't resized to the applet size anymore.
- It now tiles the background image.
- Due to several browser bugs we decided not to resize the background image
- anymore.
-
-
- ---------------------------------------------
-
- FAQ:
-
- JAVA.LANG.APPLETSECURITY EXCEPTION
-
- Some applet will not work if started localy with
- an Explorer 3.01 3.02 and 4.0.
- But they will work if started from the net.
- Microsoft made a very rigid security ristriction on applets.
- There where many complains abouth this restriction,
- because it makes it impossible to test applets localy.
- There where many complains abouth this restriction so
- microsoft made it possible to install
- another Java Virtual Machine on the Explorer.
- http://www.microsoft.com/java/download/dl_vmsp2.htm
-
- Note: that this download only works if you haven't start
- an applet.
- So close the Ms Explorer and restart it and go to this url.
-
- -------------------------
- COPYRIGHT:
- This applet is free of charge if used on a NON-commercial private
- homepage.
- The only thing asked is a small link to our site.
-
- This applet is not free to use on commercial pages.
- Commercial users must donate a fee.
- This fee is merely a compensation for the free time
- and expenses made for creating this applet.
- The fee is US $25.--
- Currently we don't have a foreign bank in the US.
- (working on this)
- You can send the fee by post to:
- RJHM van den Bergh
- Aldenhof 67-24
- 6537 DC NIJMEGEN
- NETHERLANDS
- or make a bank transaction to:
- BANKCODE : ING BNL 2A ,
- BANKNAME : Postbank NV
- CITY OFFICE : Arnhem
- place : NETHERLANDS = NL
- MENTION : for account nr. 2839775 RJHM van den Bergh
-
- ------------------------------------------
- More info :
- mailto : rvdb@nedernet.nl
-