home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 November / PCO1197.ISO / FilesBBS / WIN95 / BUTTONS.EXE / tmp / buttons / ImageButton / ImageButton2.txt < prev    next >
Encoding:
Text File  |  1997-09-19  |  17.0 KB  |  455 lines

  1. ImageButton 2.05 instruction file
  2.  
  3. -----------------------------------------
  4.  
  5. What this applet is:
  6. This applet is a general multi purpuse button.
  7. The applet is capable of creating a number of buttons on a panel.
  8.  
  9. -----------------------------------------
  10.  
  11. INSTALATION :
  12. 1: Insert the applet tags such as discribed below in your html file.
  13. 2: Upload the ImageButtun2.class file and your html file to the
  14. providers computer.
  15. 3: Also Upload the necessary sound and image files.
  16.  
  17. -----------------------------------------
  18. The applet tags:
  19.  
  20. <APPLET code="ImageButton2.class" height=310 width=120>
  21. This is the starting tag of the applet.
  22. CODE tells the browser only the name of the class file.
  23. Not the place.
  24. Normaly the browser expects the classfile in the same directory
  25. as the html file.
  26. If you want to change this use the codebase attribute.
  27. Note that codebase also changes the place where the buttonpictures
  28. and other files are expected to be.
  29. HEIGHT this is the applet height in pixels.
  30. WIDTH this is the width of the applet in pixels
  31. This tag can't be omited.
  32.  
  33. <PARAM NAME="loadmessage" VALUE="Loading please wait">
  34. This parameter lets you display a message on the applet
  35. while the images and sound files are being loaded.
  36. If you omit this tag the text will be loading.
  37.  
  38. <PARAM NAME="direction" VALUE="vertical">
  39. This is the how the buttons are alligned.
  40. Also possible = "horizontal" .
  41. This tag can't be omited.
  42.  
  43. <PARAM NAME="bgcolor" VALUE="#FF0000">
  44. This is the color of the panel.
  45. If omited the color will be black.
  46.  
  47. <PARAM NAME="background" VALUE="someImage.jpg">
  48. You can use a background image for the applet.
  49. If omited no background image will be used.
  50.  
  51. <PARAM NAME="numberoffbuttons" VALUE="4">
  52. The applet does not automaticly check the number of buttons.
  53. This parameter tag can't be omited.
  54.  
  55.  
  56. NOTE: Next comes a serie of tags to set default values.
  57. These default values are used to reduce the loading time
  58. and or reduce the number of tags.
  59.   For example if all the buttons in up position look the same.
  60. Then you specify one default button up image.
  61. You then don't have to specify the button up image multiple times.
  62. This reduces the number of tags.
  63. Also the amouth of data loaded by the applet is reduced.
  64. Because only one button up image is loaded in stead of mutiple.
  65. (The applet will sartup faster)
  66.   But what if one of that button up image must be different.
  67. You still can use the default tag.
  68. But later on you specify a specific button up image for the different
  69. button.
  70. This overrrides the default image.
  71. You can overide all default values.
  72.  
  73.  
  74.  
  75. <PARAM NAME="button_up_default" VALUE="pictures/button_up.jpg">
  76. <PARAM NAME="button_above_default" VALUE="pictures/button_above.jpg">
  77. <PARAM NAME="button_down_default" VALUE="pictures/button_down.jpg">
  78. These are the default images used for the button.
  79. The first if the button is up.
  80. The second when the mouse is above the button.
  81. The third when the button is pressed.
  82. All these three tags can be omited.
  83. If omited no default image is selected.
  84. Note: All button UP images must be specified by default or by the
  85. specific button tag.
  86. Because they are used for the layout of the panel.
  87.  
  88. <PARAM NAME="button_x_default" VALUE="10">
  89. You can determine the layout manualy.
  90. This one aligns all buttons to 10 pixels from the
  91. left side of the applet.
  92. If omited the applet do the layout for you.
  93.  
  94. <PARAM NAME="button_y_default" VALUE="10">
  95. You can determine the layout manualy.
  96. This one aligns the buttons 10 pixels from above.
  97. I omited the applet will use it own layout manager.
  98.  
  99. <PARAM NAME="text_color_up_default" VALUE="#FFFFFF">
  100. <PARAM NAME="text_color_above_default" VALUE="#FFFF00">
  101. <PARAM NAME="text_color_down_default" VALUE="#FFFFFF">
  102. These are the default colors of the text on the buttons.
  103. The first if the button is up.
  104. The second when the mouse is above the button.
  105. The third when the button is pressed.
  106. All these three tags can be omited.
  107. If omited that default color will be black.
  108.  
  109. <PARAM NAME="text_type_up_default" VALUE="1">
  110. <PARAM NAME="text_type_above_default" VALUE="1">
  111. <PARAM NAME="text_type_down_default" VALUE="1">
  112. These are the default text type of the buttons.
  113. The first if the button is up.
  114. The second when the mouse is above the button.
  115. The third when the button is pressed.
  116. Possible are 0=plain 1=bold 2=italic and 3=italic and bold.
  117. All these three tags can be omited.
  118. If omited that default type will be plain.
  119.  
  120. <PARAM NAME="text_height_up_default" VALUE="12">
  121. <PARAM NAME="text_height_above_default" VALUE="12">
  122. <PARAM NAME="text_height_down_default" VALUE="9">
  123. This is the default height of the font
  124. The first if the button is up.
  125. The second when the mouse is above the button.
  126. The third when the button is pressed.
  127. All these three tags can be omited.
  128. If omited that default heigth will be 12.
  129. So in this example the first and second tag can be omited.
  130.  
  131. <PARAM NAME="defaultfont" VALUE="Dialog">
  132. Only one font can be set.
  133. If the browser doesn't support this font the browsers
  134. default font will be used.
  135. Some other common fonts are: "TimesRoman",
  136. "Courier", "Helvetica".
  137. Note:Watch the lettercassing of these names.
  138. Java is case sensitive.
  139. If omited the borwsers default font will be used.
  140. Note:Some computers use as default the Dialog font.
  141. This font only can be sized in steps.
  142.  
  143. <PARAM NAME="sound_up_default" VALUE="geluiden/exit.au">
  144. <PARAM NAME="sound_above_default" VALUE="geluiden/above.au">
  145. <PARAM NAME="sound_down_default" VALUE="geluiden/down.au">
  146. This are the default sounds of the buttons.
  147. The first if the button goes to the up position.
  148. The second when the mouse is enters the button.
  149. The third one when the button is pressed.
  150. All these tags can be omited.
  151. If omited no default sound is selected.
  152.  
  153. <PARAM NAME="wait_for_sound_default" VALUE="2000">
  154. This lets the browser wait before loading the url.
  155. The browser waits so the sound of a pressed button can
  156. be played properly.
  157. If the sound is playing and the url is loaded the sound can
  158. be distorted.
  159. Also when waiting the button will stay down.
  160. If omited the browser this default value will be 0.
  161. (The value is in milliseconds)
  162.  
  163. <PARAM NAME="target_default" VALUE="right">
  164. This is the default frame.
  165. The applet can be used on html pages with frames.
  166. "right" is in this case the name of the frame.
  167. If omited no default frame will be set.
  168.  
  169.  
  170. NOTE:Above is explained how the default tags are set.
  171. Default tags set the default values,images or sounds for the buttons.
  172. For each button you can override the default values.
  173. This is done by the specific tags.
  174. Just replace the "....default" in the parameter name with
  175. the button number.
  176. But first I will explain the specific tags where the you can't
  177. set a default value for.
  178.  
  179. For example if you want to set a specific color for button number
  180. three.
  181. <PARAM NAME="text_color_up_3" VALUE="#0000FF">
  182. <PARAM NAME="text_color_above_3" VALUE="#00FF00">
  183. <PARAM NAME="text_color_down_3" VALUE="#125354">
  184. or use other sounds for button three
  185. <PARAM NAME="sound_up_3" VALUE="geluiden/othersound.au">
  186. <PARAM NAME="sound_above_3" VALUE="geluiden/somesound.au">
  187. <PARAM NAME="sound_down_3" VALUE="geluiden/blabla.au">
  188. or even just some other buttonImages
  189. <PARAM NAME="button_up_3" VALUE="pictures/otherButtonImage.jpg">
  190. <PARAM NAME="button_above_3" VALUE="pictures/anotherImage.jpg">
  191. <PARAM NAME="button_down_3" VALUE="pictures/someOtherImage.gif">
  192. Remember Just simple replace the default word with your button number.
  193.  
  194.  
  195. <PARAM NAME="url_1" VALUE="java.html">
  196. This sets the url (=internet adress) where the browser will jump to
  197. when clicked on button one.
  198. For button 2 replace "url_1" with "url_2" and so on.
  199. If omited no url is used.
  200. This applets supports relative and absolute urls.
  201. Also html frames (target parameter tag).
  202. Also it support html anchors.
  203. Note: an anchor must be preceded by a html filename.
  204. If this tag is omited the button will not use an url.
  205.  
  206. <PARAM NAME="statustext_1" VALUE="Back to the Java index.">
  207. This set the text that must be displayed on the statusbar.
  208. The text is displayed when the mouse is above the first button.
  209. If you wont the statustext set for the second button replace the
  210. "1" with "2" and so on.
  211. This tag can be omited.
  212. If omited the browser will display the url.
  213. If omited and no url is selected the browser not display a statustext.
  214. Also if the Value="" no statustext will be displayed.
  215.  
  216. <PARAM NAME="text_up_1" VALUE="BACK">
  217. <PARAM NAME="text_above_1" VALUE="java index">
  218. <PARAM NAME="text_down_1" VALUE="java index">
  219. It is also possible to write a text on the button image.
  220. Offcourse there can be no default values set for this.
  221. These parameters can be omited.
  222. If omited no text will be displayed.
  223.  
  224.  
  225. <!-- button 1 -->
  226. <PARAM NAME="text_up_1" VALUE="BACK">
  227. <PARAM NAME="text_above_1" VALUE="java index">
  228. <PARAM NAME="text_down_1" VALUE="java index">
  229. <PARAM NAME="url_1" VALUE="java.html">
  230. <PARAM NAME="statustext_1" VALUE="Back to the Java index.">
  231.  
  232. <PARAM NAME="target_1" VALUE="">
  233. If a default target is selected and you don't want a target for this button
  234. Then set the value to "".
  235.  
  236. <PARAM NAME="button_x_1" VALUE="0">
  237. <PARAM NAME="button_y_1" VALUE="0">
  238. This puts the first button in the upper left corner.
  239. With these parameters you can layout the buttons yourself.
  240. Remember don't put any buttons above each other.
  241. This x and y are the coordinates of the upper left corner of the button.
  242. If omited the applet will layout the buttons.
  243.  
  244. <!-- button 2 -->
  245. <PARAM NAME="text_up_2" VALUE="FEATURES">
  246. <PARAM NAME="text_above_2" VALUE="Features">
  247. <PARAM NAME="text_down_2" VALUE="features">
  248. <PARAM NAME="url_2" VALUE="ImageButton2_features.html">
  249. <PARAM NAME="statustext_2" VALUE="look what this applet can do.">
  250.  
  251. <!-- button 3 -->
  252. <PARAM NAME="text_up_3" VALUE="THE TAGS">
  253. <PARAM NAME="text_above_3" VALUE="Tag Example">
  254. <PARAM NAME="text_down_3" VALUE="the applet tags">
  255. <PARAM NAME="url_3" VALUE="ImageButton2_tags.html">
  256. <PARAM NAME="statustext_3" VALUE="See an example of the applet tags">
  257.  
  258. <!-- button 4 -->
  259. <PARAM NAME="text_up_4" VALUE="DOWNLOAD">
  260. <PARAM NAME="text_above_4" VALUE="ImageButton2">
  261. <PARAM NAME="text_down_4" VALUE="download">
  262. <PARAM NAME="url_4" VALUE="construction.html">
  263. <PARAM NAME="statustext_4" VALUE="Download ImageButton2.zip (zipfile includes more information)">
  264.  
  265. </APPLET>
  266. This is the closing tag of the applet.
  267. No more applet tags will follow.
  268.  
  269. -----------------------------------------
  270. HINTS :
  271.  
  272. 1. if you have set all the default images and want one button not to change.
  273. for example button 3. overide the above and down image of this
  274. button to the same as the up button.
  275. <PARAM NAME="button_up_default" VALUE="pictures/button_up.jpg">
  276. <PARAM NAME="button_above_3"    VALUE="pictures/button_up.jpg">
  277. <PARAM NAME="button_down_3"     VALUE="pictures/button_up.jpg">
  278.  
  279. 2. You can use this applet as a button ruler.
  280. set direction to horizontal.
  281. Make sure that the sum of the button width equals the applet width.
  282. Then you hav a horizontal line of buttons in your page.
  283. You can't attach local links to the buttons.
  284. Something like <a href="page.html#middle">
  285. As far as I know local links aren't supported by the current
  286. Java versions (1.02).
  287.  
  288. 3. The applet doesn't have to be used with html frames.
  289. It can be used with frames
  290.  
  291. 4. You also can use an url to another place
  292. in the same page.
  293. something like http://www.somesite.html#anchor555
  294.  
  295. 5. You also must think that some browsers doesn't support java.
  296. Then any ordenary html tags between the applet start and endtag is executed.
  297. So you can set an imagemap or a list of html links between them.
  298. They will not be executed if the browser supports Java.
  299. (Allmost every browser supports Java but not all !! )
  300.  
  301. 6. There is an advanced feature.
  302. It is possible to do a tag like
  303. <PARAM NAME="button_up_4" VALUE="=3">
  304. This means that the up image of button 3 is copied to
  305. the image of button 4.
  306. This also reduces the loading time.
  307. It is possible for the up down and above images.
  308. NOTE: this only works backwards.
  309. for example coping image 6 to 5 doesn't work.
  310. This can be useful if you have two or more different kind
  311. of button sets on your page.
  312.  
  313. 7. Its also possible to let the button open a new html page
  314. in a new browser window.
  315. Just use a non existing html frame name for the target parameter.
  316.  
  317. 8. It is possible to create a table with buttons.
  318. You can set the coordinates of the buttons manualy.
  319. This maces it possible for you to determine the
  320. layout manualy.
  321.  
  322. 9. You also can use a two status button.
  323. Just omit the down images of the button.
  324. If the applet doesn't find an down image it will
  325. try to use the above image.
  326. So if there is now image for a pressed button it
  327. will try to use the mouse above one.
  328.  
  329.  
  330. -----------------------------------------
  331. DISCLAIMER :
  332. By using this applet you accept the maximum claim you can make
  333. is equal to the amount you paid to us for this applet.
  334. This is so because of the low price of the applet.
  335.  
  336. -----------------------------------------
  337. BUGS:
  338.  
  339. -1: The Dialog font can only be sized in big stepes.
  340. This is not caused by the program but by the operating system.
  341. The dialog font can be the default font of the browser.
  342. Solution set another defaultfont with the applettag.
  343.  
  344. -2: If you use an one color gif file as an button this can cause
  345. an IO error.
  346. This only occurs if the picture is a gif89 format.
  347. Solution convert it to a standard gif87 picture.
  348.  
  349. -3: Netscape dithers gif files to 125 color pallet.
  350. This is not caused by the applet but by the Netscape browser.
  351.  
  352. -4: Transparent gifs with Java applets are not correctly supported by Netscape.
  353. Sometimes they are not completly drawn.
  354. This is a bug in the Netscape browser.
  355.  
  356. -5: Transparent gifs on Explorer aren't supported correctly.
  357. There is a differance if you draw text on the button.
  358. If you draw text on the button the background color of the applet
  359. will be displayed.
  360. If you don't draw text on the button the background image will be displayed.
  361. (if you use one).
  362.  
  363. -6: if you use anchors within the url it will not work properly
  364. on a Explorer 4.0.
  365. I fixed the anchor bug of the explorer 3.0x but now the anchor don't work
  366. correctly on the explorer 4.0.
  367.  
  368. -7: if you use the mailto protocol in the url it will not work with the
  369. Explorer 3.0.
  370. This is caused by a bug in the Explorer 3.0
  371. It probably will work on the explorers 3.01 and 3.02.
  372.  
  373. -8: setting an applet size wit a percentage in the applet tag
  374. will not work in the explorer 3.0
  375. This is fixed in the later versions of this browser
  376. So don't use an percantage to set the applet size.
  377.  
  378. BUGFIX:
  379. -1: Ms Internet Explorer 4.0(beta) relative addressing didn't work correctly.
  380. The cause was a bug within the browser.
  381. Version 2.01 has a workarround added for this problem.
  382.  
  383. -2: version 2.02
  384. Netscape communicator nullpointer exceptions did occur on the statusbar
  385. when the browser starts and the mouse is above the applet.
  386. It is caused because the browser acts a little diferrent from the previus versions.
  387. Netscape did put a routine in the browser that catches these exceptions.
  388. A workarround has been added.
  389.  
  390. -3: version 2.03
  391. An error in the loading of the applet background image has been fixed.
  392.  
  393. -4: version 2.04
  394. When correcting the bug of version 2.03 a bug appeared on the Explorer 3.0 and
  395. Netscape 3.x
  396. The background then on these browsers didn't appear.
  397. It has now also been corrected for these browsers.
  398.  
  399. -5: version 2.05
  400. The background image now isn't resized to the applet size anymore.
  401. It now tiles the background image.
  402. Due to several browser bugs we decided not to resize the background image
  403. anymore.
  404.  
  405.  
  406. ---------------------------------------------
  407.  
  408. FAQ:
  409.  
  410. JAVA.LANG.APPLETSECURITY EXCEPTION
  411.  
  412. Some applet will not work if started localy with
  413. an Explorer 3.01 3.02 and 4.0.
  414. But they will work if started from the net.
  415. Microsoft made a very rigid security ristriction on applets.
  416. There where many complains abouth this restriction,
  417. because it makes it impossible to test applets localy.
  418. There where many complains abouth this restriction so
  419. microsoft made it possible to install
  420. another Java Virtual Machine on the Explorer.
  421. http://www.microsoft.com/java/download/dl_vmsp2.htm
  422.  
  423. Note: that this download only works if you haven't start
  424. an applet.
  425. So close the Ms Explorer and restart it and go to this url.
  426.  
  427. -------------------------
  428. COPYRIGHT:
  429. This applet is free of charge if used on a NON-commercial private
  430. homepage.
  431. The only thing asked is a small link to our site.
  432.  
  433. This applet is not free to use on commercial pages.
  434. Commercial users must donate a fee.
  435. This fee is merely a compensation for the free time
  436. and expenses made for creating this applet.
  437. The fee is US $25.--
  438. Currently we don't have a foreign bank in the US.
  439. (working on this)
  440. You can send the fee by post to:
  441.     RJHM van den Bergh
  442.     Aldenhof 67-24
  443.     6537 DC NIJMEGEN
  444.     NETHERLANDS
  445. or make a bank transaction to:
  446.     BANKCODE    : ING BNL 2A ,
  447.     BANKNAME    : Postbank NV
  448.     CITY OFFICE : Arnhem
  449.     place       : NETHERLANDS = NL
  450.     MENTION     : for account nr. 2839775 RJHM van den Bergh
  451.  
  452. ------------------------------------------
  453. More info :
  454. mailto : rvdb@nedernet.nl
  455.