home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / CHIP_4_98.ISO / Java / applet / fluid / fluid.txt < prev    next >
Encoding:
Text File  |  1998-02-21  |  12.6 KB  |  292 lines

  1.  
  2.           Anfy Fluid 2.1 - Copyright (C) by Fabio Ciucci 1997/98
  3.  
  4.  
  5. This applet can simulate fluid wavings.
  6. Remember that are needed both flud.class and Lware.class.
  7. You must upload these 2 .class files and insert the <applet> tag on your
  8. html document to add this applet to your page.
  9. This applet is fully parametrized, so you can generate all kinds of fluids
  10. you want. Here an example of what you have to write in the html (the
  11. things anfter the ; are comments with min-max values acceptet):
  12.  
  13.  
  14. <applet code="fluid.class" width=200 height=200> ; Name, Width, Height
  15. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  16. <param name=regcode value="NO">         ; Register code (if you have it)
  17. <param name=reglink value="NO">         ; URL where go optionally when clicked
  18. <param name=regnewframe value="YES">    ; Reglink opened in new frame?
  19. <param name=regframename value="_blank"> ; Name of new frame for reglink
  20. <param name=statusmsg value="Fluid applet">  ; Statusbar message
  21. <param name=res value="1">              ; resolution (1 .. 8)
  22. <param name=autodesign value="YES">     ; Auto design ("YES" or "NO")
  23. <param name=density value="4">          ; Density of fluid (2 .. 6)
  24. <param name=fishnum value="0">          ; Number of fishes (0 .. 2)
  25. <param name=rainsize value="0">         ; Size of circular rain (0 = OFF)
  26. <param name=rainfactor value="10">      ; Circular rain factor
  27. <param name=srainsize value="0">        ; Size of square rain (0 = OFF)
  28. <param name=srainfactor value="10">     ; Square rain factor
  29. <param name=volcano value="NO">         ; Volcano's magma mode (YES, NO)
  30. <param name=textscroll value="fluidscr.txt"> ; File for scrolltext or "NO"
  31. <param name=textoffset value="140">          ; Txtscroll y offset
  32. <param name=textspeed value="1">          ; Txtscroll speed
  33. <param name=textfont value="Arial">       ; Txtscroll font name
  34. <param name=textbold value="NO">          ; Txtscroll bold ("YES" or "NO")
  35. <param name=textsize value="24">          ; Txtscroll font size
  36. <param name=textshadow value="YES">       ; Txtscroll shadow ("YES" or "NO")
  37. <param name=TextColR value="200">         ; Txtscroll color (red component)
  38. <param name=TextColG value="255">         ; Txtscroll color (green component)
  39. <param name=TextColB value="190">         ; Txtscroll color (blue component)
  40. <param name=TextSColR value="20">         ; Txtscroll shadow col. (red c.)
  41. <param name=TextSColG value="20">         ; Txtscroll shadow col. (green c.)
  42. <param name=TextSColB value="50">         ; Txtscroll shadow col. (blue c.)
  43. <param name=TextJumpAmp value="0">        ; Txtscroll jump aplitude
  44. <param name=TextJumpSpd value="0">        ; Txtscroll jump speed
  45. <param name=TextSineAmp value="0">        ; Txtscroll sineshape amplitude        
  46. <param name=TextSineSpd value="0">        ; Txtscroll sineshape movement
  47. <param name=TextSineAngle value="0">      ; Txtscroll sineangle / pixel  
  48. <param name=memdelay value="1000">        ; Memory deallocation delay
  49. <param name=priority value="3">           ; Task priority (1..10)
  50. <param name=MinSYNC value="10">           ; Min. milliseconds/frame for sync
  51. Sorry, your browser doesn't suppor Java.  ; Message for no java browsers.
  52. </applet>                                 ; End of applet tag
  53.  
  54.  
  55. NOTE: Don't place "; comments" on final HTML!!!
  56.  
  57. Copy and paste in your html document this cleared and correct tag:
  58.  
  59.  
  60. <applet code="fluid.class" width=200 height=200>
  61. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  62. <param name=regcode value="NO">
  63. <param name=reglink value="NO">
  64. <param name=regnewframe value="YES">
  65. <param name=regframename value="_blank">
  66. <param name=statusmsg value="Fluid applet">
  67. <param name=res value="1">
  68. <param name=autodesign value="YES">
  69. <param name=density value="4">
  70. <param name=fishnum value="0">
  71. <param name=rainsize value="0">
  72. <param name=rainfactor value="10">
  73. <param name=srainsize value="0">
  74. <param name=srainfactor value="10">
  75. <param name=volcano value="NO">
  76. <param name=textscroll value="fluidscr.txt">
  77. <param name=textoffset value="40">
  78. <param name=textspeed value="2">
  79. <param name=textfont value="Courier">
  80. <param name=textbold value="YES">
  81. <param name=textsize value="18">
  82. <param name=textshadow value="YES">
  83. <param name=TextColR value="250">
  84. <param name=TextColG value="200">
  85. <param name=TextColB value="90">
  86. <param name=TextSColR value="20">
  87. <param name=TextSColG value="20">
  88. <param name=TextSColB value="50">
  89. <param name=TextJumpAmp value="10">
  90. <param name=TextJumpSpd value="10">
  91. <param name=TextSineAmp value="0">
  92. <param name=TextSineSpd value="0">
  93. <param name=TextSineAngle value="0">
  94. <param name=memdelay value="1000">
  95. <param name=priority value="3">
  96. <param name=MinSYNC value="10">
  97. Sorry, your browser doesn't suppor Java.
  98. </applet>
  99.  
  100.                              ---------
  101.  
  102.  
  103. Here detailed instructions about how to change parameters:
  104.  
  105. The credits parameter can't be changed otherwise the applet will not work.
  106.  
  107. To activate the reg parameters read the shareware registration notes.
  108. In the "regcode" parameter you have to place the registration code you
  109. purchase from the author. If it is correct and the applet is run from the
  110. registered domain name, you can use "reglink" parameter, where you can specify
  111. an URL where bring user when the applet is clicked.
  112. If you set to "YES" regnewframe, you can specify a frame where load the
  113. reglink:
  114.  
  115. "_blank"  : To load the link in a new blank unnamed browser window.
  116. "_self"   : To load the link into the same window the applet occupies.
  117. "_parent" : To load the link into the immediate FRAMESET parent.
  118. "_top"    : To load the link into the top body of the window.
  119.  
  120. Otherwise the frame name, for example "myframe1".
  121.  
  122. The height for good results must be 200. You can change the width.
  123. res is a sort of zoomer.
  124.  
  125. If you set to "YES" the "autodesign" parameter, an automatic slideshow of the
  126. effects will be executed, and next parameters are ignored.
  127.  
  128. If you set to "NO" the autodesign, you have to configure effects manually:
  129.  
  130. The "density" parameter (2 .. 6) controls the density if fluid. Lower values
  131. mean more fluid liquid, so waves dead fast. Higher walues cause a slower
  132. decadence of the waves.
  133.  
  134. You can insert up to 2 fishes, with "fishnum" parameter.
  135.  
  136. Other effects are: rain and srain.
  137.  
  138. Set the parameter "rainsize" to more than 0 to activate the circular rain.
  139. The "rainfactor" parameter works as "timer" between one drip and another.
  140. Setting "rainfactor" to 0, a new drip will appear every frame.
  141. Higher values mean more distance between one drip and another.
  142.  
  143. The "srainsize" will determine a square rain. If it is set to zero, no
  144. rain. Values higher or equals to 1 will generate rain.
  145. To control it use "srainfactor" as seen for "rainfactor".
  146.  
  147. You can enable more than one effect at the same time.
  148. The "volcano" parameter, if set to "YES" transform the water in lavic magma,
  149. for infernal ambientations.
  150.  
  151.  
  152.                              ---------
  153.  
  154.  
  155. Optional Scrolltext parameters:
  156.  
  157.  
  158. You can optionally activate a scrolltext that will scroll over the applet.
  159. If you don't need the scrolltext, deactivate it placing "NO" at the
  160. "textscroll" parameter.
  161. Otherwise you must supply the name of an ASCII text file, where you must
  162. write the text that you want to be scrolled.
  163. Is supported one only line of text, that can be long as you want.
  164. Remember to upload the text file too, if you activate the scrolltext!
  165.  
  166. If activated, here are the parameters:
  167.  
  168. With "textoffset" you choose the Y offset from the top: placing it to 0 the
  169. scroll will be placed on the top, for example, and placing a value near the
  170. height of the applet it will scroll at the bottom.
  171.  
  172. With "textspeed" parameter you decide the scrolling speed.
  173.  
  174. With "textfont" you choose the font of text. Don't choose a strange or not
  175. standard font, not present in all systems.
  176. The most common fonts are "Arial", "TimesRoman" and "Courier".
  177. If the required font is not present, the most "near" will be used.
  178.  
  179. Setting "textbold" to "YES" you will enlarge a bit the font, otherwise set
  180. it to "NO" for normal contours.
  181.  
  182. With "textsize" you can change the size of text font.
  183. The most common sizes are: 8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72.
  184. Intermediate values will be scaled to nearest available size.
  185.  
  186. Setting "textshadow" to "YES", a shadow will be added to textscroll.
  187. Otherwise, setting it to "NO", any shadow will be "projected".
  188.  
  189. You can choose the color of text with:
  190.  
  191. TextColR = Red component of color (0-255)
  192. TextColG = Green component of color (0-255)
  193. TextColB = Blue component of color (0-255)
  194.  
  195. For example, 0,0,0 is black, 255,255,255 is white, 255,0,0 is red,
  196. 255,255,0 is yellow, 128,128,128 is grey.
  197. You can compose any color you want, do it trying manually or use any paint
  198. program's color selector to find Red Green Blue components of your desired
  199. colors.
  200.  
  201. With TextSColR,TextSColG,TextSColB you can select the color for text shadow.
  202.  
  203. If you like, you can activate the text jumping function.
  204. If "TextJumpAmp" is set to "0", any jumping will be shown.
  205. But increasing the value will result in text jumping: more aplitute, more
  206. high jumps.
  207.  
  208. With "TextJumpSpd" parameter you can select the jumping speed.
  209.  
  210. If you like, you can also activate the sine scroll function.
  211. If "TextSineAmp" is set to 0, no sine distortion will be generated.
  212. But increasing the value will result in the that the text is waving. The
  213. higher amplitude, the more waving.
  214.  
  215. With the "TextSineSpd" parameter you can select the speed of the wave.
  216.  
  217. With the "TextSineAngle" parameter you control how many degrees in a sinewave
  218. shape the text will be deformed for each pixel. A higher value gives more
  219. distortion.
  220.  
  221.                              ---------
  222.  
  223.  
  224. Compatibility parameters:
  225.  
  226.  
  227. The "memdelay" parameter is useful only to run the applets without problems
  228. on some bugged versions of Netscape 3, that don't deallocate correctly
  229. the memory allocated, resulting in filling all the memory after a minute
  230. the applet is running. This can cause also a system crash in some cases.
  231. Last versions of browsers have fixed this problem, but if you want to run
  232. the applets on old bugged browsers too, set "memdelay" to low values, like
  233. "10" or "16", for example.
  234. But this will slow down a lot the applet speed, so you have to choose
  235. between speed (memdelay set to 1000 or higher) or slow compatibility with
  236. old browsers (memdelay set to 20 or lower).
  237.  
  238. The "priority" parameter is useful mainly when you are running more than
  239. one applet in same page, and one slows down or hangs.
  240. If this applet run too slow or hangs because other one steal all the CPU
  241. power, try increasing the priority.
  242. Otherwise, if this applet runs well and others slows down, decrease the
  243. priority. Consider the min priority is 1, normal priority is 5, and the
  244. max priority is 10. Usually a priority of 3 is ok for single applets.
  245.  
  246. The "MinSYNC" parameter must be set to a value between 8 and 16 to slow
  247. down animation in the case it runs too faster on faster computers or because
  248. the applet size is very small. The optimal value seems to be 10, but you can
  249. disable this feature placing a value of 0 if you see flickerings or excessive
  250. slow down.
  251. If the applets steal 100% of CPU power or slows down the browser and Operating
  252. System, try increasing MinSYNC until all runs ok.
  253. Usually values between 40 and 400 fixes all problems, even if applet slows
  254. down for compatibility.
  255.  
  256.                              ---------
  257.  
  258.  
  259.  
  260. Copyright and distribution notices
  261.  
  262.  
  263. Fabio Ciucci is the author and owner of this applet.
  264. You can use freely this applet to enhance your web pages. But since I am
  265. the author of the applet, I placed a secret linkware window that will appear
  266. if the applet is clicked with mouse, only when the applet is online on a site:
  267. it is external to the web browser, so it will not hit the design of your
  268. beautyful html page.
  269. This small window will simply show my name and ask for a link to my java
  270. applets page.. the user can connect to it or cancel, or hide the window and
  271. connect after visiting all your pages.
  272. I hope this credit part is not a problem for you...
  273. In any case, if link is accepted a new browser window will appear and your
  274. page will remain on the original window, so you will not lost the visitor.
  275. Consider you will use an effect programmed by me, without pay, for FREE!
  276.  
  277. NOTE: You can include the applets archive on CD-ROMS or shareware collections
  278. and shareware sites without ask me, but only if you leave the archive(s)
  279. unchanged.
  280.  
  281.  
  282.                              ---------
  283.  
  284.  
  285. Fabio Ciucci (Randy/Ram Jam)
  286.  
  287. fabioc@anfiteatro.it
  288.  
  289. http://www.anfiteatro.it/java.html
  290.  
  291.  
  292.