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

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