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

  1.  
  2.           AnfyRotate 2.1 - Copyright (C) by Fabio Ciucci 1996/98
  3.  
  4.  
  5. This applet can zoom and rotate (eventually distorted) any GIF or JPG image,
  6. the only requirement is that this image must be large equally to one of
  7. the powers of 2 (64x64 pixel, or 32x64, 128x128, ...).
  8. Remember that are needed both Rot2.class , Lware.class and anfy.class.
  9. You must upload these 3 .class files and insert the <applet> tag on your
  10. html document to add this applet to your page.
  11. This applet is fully parametrized, so you can generate all kinds of rotators
  12. you want. Here an example of what you have to write in the html (the
  13. things anfter the ; are comments with min-max values acceptet):
  14.  
  15.  
  16. <applet code="Rot2.class" width=150 height=150> ; Name, Width, Height
  17. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  18. <param name=regcode value="NO">         ; Register code (if you have it)
  19. <param name=reglink value="NO">         ; URL where go optionally when clicked
  20. <param name=regnewframe value="YES">    ; Reglink opened in new frame?
  21. <param name=regframename value="_blank"> ; Name of new frame for reglink
  22. <param name=statusmsg value="Rotator applet">  ; Statusbar message
  23. <param name=image value="img64n1.GIF">          ; Image to load
  24. <param name=res value="1">                      ; resolution (1-8)
  25. <param name=rotmode value="6">                  ; mode (1-6)
  26. <param name=rspeed value="2">                   ; rotation speed (1-8)
  27. <param name=zoommin value="4">                  ; zoom min value (0-80)
  28. <param name=zoommax value="25">                 ; zoom max value (0-80)
  29. <param name=zoomspd value="4">                  ; zoom speed (1-20)
  30. <param name=modix value="1">                    ; distort modify x (0-8)
  31. <param name=modiy value="2">                    ; distort modify y (0-8)
  32. <param name=auto1 value="100">                  ; auto wait 1 (0-10000)
  33. <param name=auto2 value="230">                  ; auto wait 2 (0-10000)
  34. <param name=textscroll value="rotscr.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=MinSYNC value="10">           ; Min. milliseconds/frame for sync
  55. Sorry, your browser doesn't suppor Java.  ; Message for no java browsers.
  56. </applet>                                 ; End of applet tag
  57.  
  58.  
  59. NOTE: Don't place "; comments" on final HTML!!!
  60.  
  61. Copy and paste in your html document this cleared and correct tag:
  62.  
  63.  
  64. <applet code="Rot2.class" width=180 height=150>
  65. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  66. <param name=regcode value="NO">
  67. <param name=reglink value="NO">
  68. <param name=regnewframe value="YES">
  69. <param name=regframename value="_blank">
  70. <param name=statusmsg value="Rotator applet">
  71. <param name=res value="1">
  72. <param name=image value="img64n1.GIF">
  73. <param name=rotmode value="6">
  74. <param name=rspeed value="2">
  75. <param name=zoommin value="4">
  76. <param name=zoommax value="25">
  77. <param name=zoomspd value="4">
  78. <param name=modix value="1">
  79. <param name=modiy value="2">
  80. <param name=auto1 value="100">
  81. <param name=auto2 value="230">
  82. <param name=textscroll value="rotscr.txt">
  83. <param name=textoffset value="140">
  84. <param name=textspeed value="1">
  85. <param name=textfont value="Arial">
  86. <param name=textbold value="NO">
  87. <param name=textsize value="24">
  88. <param name=textshadow value="YES">
  89. <param name=TextColR value="255">
  90. <param name=TextColG value="255">
  91. <param name=TextColB value="0">
  92. <param name=TextSColR value="20">
  93. <param name=TextSColG value="20">
  94. <param name=TextSColB value="50">
  95. <param name=TextJumpAmp value="0">
  96. <param name=TextJumpSpd value="0">
  97. <param name=TextSineAmp value="0">
  98. <param name=TextSineSpd value="0">
  99. <param name=TextSineAngle value="0">
  100. <param name=memdelay value="1000">
  101. <param name=priority value="3">
  102. <param name=MinSYNC value="10">
  103. Sorry, your browser doesn't suppor Java.
  104. </applet>
  105.  
  106.  
  107.                              ---------
  108.  
  109.  
  110. Here detailed instructions about how to change parameters:
  111.  
  112.  
  113. The credits parameter can't be changed otherwise the applet will not work.
  114.  
  115. To activate the reg parameters read the shareware registration notes.
  116. In the "regcode" parameter you have to place the registration code you
  117. purchase from the author. If it is correct and the applet is run from the
  118. registered domain name, you can use "reglink" parameter, where you can specify
  119. an URL where bring user when the applet is clicked.
  120. If you set to "YES" regnewframe, you can specify a frame where load the
  121. reglink:
  122.  
  123. "_blank"  : To load the link in a new blank unnamed browser window.
  124. "_self"   : To load the link into the same window the applet occupies.
  125. "_parent" : To load the link into the immediate FRAMESET parent.
  126. "_top"    : To load the link into the top body of the window.
  127.  
  128. Otherwise the frame name, for example "myframe1".
  129.  
  130. The image must be large equally to one of the powers of 2 (64x64
  131. pixel, or 32x64, 128x128, ...)., GIF or JPG format.
  132. Valid sizes, for example, are 8*8, 8*16, 8*32, 16*32, 32*16, 32*32, 64*64,
  133. 64*32, 128*32, 128*64, 32*128, 128*128, 256*128...
  134.  
  135. The size of the applet is determined by width and height tags, and can be
  136. different from the size of the image, offcourse.
  137.  
  138. The res parameter determine the resolution: with res=1 pixels are small,
  139. but effect is slow, with res=8 pixels are too great but effect is faster.
  140. I think the best choices are 1-3.
  141.  
  142. Rotmode is the mode of running. Here the modes:
  143.  
  144. 1) Zoom and Rotate
  145. 2) Rotate only
  146. 3) Zoom only
  147. 4) Distort only
  148. 5) Zoom and Distort
  149. 6) Automatic show: ZoomOnly, then Zoom&Rotate, then Zoom&Distort
  150.  
  151. Offcouse you can control the speed of rotation wirh rspeed, the min value
  152. and max value for zoom (when change zoom direction) with zoommin and zoommax,
  153. and offcourse the speed of zoom with zoomspd.
  154.  
  155. You can also determine the distort factors: modix for X axis and modiy for
  156. the Y axis.
  157.  
  158. Finally, you can decide the timing of mode 6 (automatic show): auto1 is the
  159. time to wait before swap between zoom and zoom&rotate, and auto2 is used
  160. to wait the other swap, from zoom&rotate to zoom&distort.
  161. Offcouse swap2 must be >= swap1. If swap1=0 then you skip Zoom and start
  162. directly with Zoom&rotate. If swap1=swap2 you skip Zoom&Rotate, jumping
  163. from zoom only to distort&rotate, and so on....
  164.  
  165.  
  166.                              ---------
  167.  
  168.  
  169. Optional Scrolltext parameters:
  170.  
  171.  
  172. You can optionally activate a scrolltext that will scroll over the applet.
  173. If you don't need the scrolltext, deactivate it placing "NO" at the
  174. "textscroll" parameter.
  175. Otherwise you must supply the name of an ASCII text file, where you must
  176. write the text that you want to be scrolled.
  177. Is supported one only line of text, that can be long as you want.
  178. Remember to upload the text file too, if you activate the scrolltext!
  179.  
  180. If activated, here are the parameters:
  181.  
  182. With "textoffset" you choose the Y offset from the top: placing it to 0 the
  183. scroll will be placed on the top, for example, and placing a value near the
  184. height of the applet it will scroll at the bottom.
  185.  
  186. With "textspeed" parameter you decide the scrolling speed.
  187.  
  188. With "textfont" you choose the font of text. Don't choose a strange or not
  189. standard font, not present in all systems.
  190. The most common fonts are "Arial", "TimesRoman" and "Courier".
  191. If the required font is not present, the most "near" will be used.
  192.  
  193. Setting "textbold" to "YES" you will enlarge a bit the font, otherwise set
  194. it to "NO" for normal contours.
  195.  
  196. With "textsize" you can change the size of text font.
  197. The most common sizes are: 8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72.
  198. Intermediate values will be scaled to nearest available size.
  199.  
  200. Setting "textshadow" to "YES", a shadow will be added to textscroll.
  201. Otherwise, setting it to "NO", any shadow will be "projected".
  202.  
  203. You can choose the color of text with:
  204.  
  205. TextColR = Red component of color (0-255)
  206. TextColG = Green component of color (0-255)
  207. TextColB = Blue component of color (0-255)
  208.  
  209. For example, 0,0,0 is black, 255,255,255 is white, 255,0,0 is red,
  210. 255,255,0 is yellow, 128,128,128 is grey.
  211. You can compose any color you want, do it trying manually or use any paint
  212. program's color selector to find Red Green Blue components of your desired
  213. colors.
  214.  
  215. With TextSColR,TextSColG,TextSColB you can select the color for text shadow.
  216.  
  217. If you like, you can activate the text jumping function.
  218. If "TextJumpAmp" is set to "0", any jumping will be shown.
  219. But increasing the value will result in text jumping: more aplitute, more
  220. high jumps.
  221.  
  222. With "TextJumpSpd" parameter you can select the jumping speed.
  223.  
  224. If you like, you can also activate the sine scroll function.
  225. If "TextSineAmp" is set to 0, no sine distortion will be generated.
  226. But increasing the value will result in the that the text is waving. The
  227. higher amplitude, the more waving.
  228.  
  229. With the "TextSineSpd" parameter you can select the speed of the wave.
  230.  
  231. With the "TextSineAngle" parameter you control how many degrees in a sinewave
  232. shape the text will be deformed for each pixel. A higher value gives more
  233. distortion.
  234.  
  235.  
  236.                              ---------
  237.  
  238.  
  239. Compatibility parameters:
  240.  
  241.  
  242. The "memdelay" parameter is useful only to run the applets without problems
  243. on some bugged versions of Netscape 3, that don't deallocate correctly
  244. the memory allocated, resulting in filling all the memory after a minute
  245. the applet is running. This can cause also a system crash in some cases.
  246. Last versions of browsers have fixed this problem, but if you want to run
  247. the applets on old bugged browsers too, set "memdelay" to low values, like
  248. "10" or "16", for example.
  249. But this will slow down a lot the applet speed, so you have to choose
  250. between speed (memdelay set to 1000 or higher) or slow compatibility with
  251. old browsers (memdelay set to 20 or lower).
  252.  
  253. The "priority" parameter is useful mainly when you are running more than
  254. one applet in same page, and one slows down or hangs.
  255. If this applet run too slow or hangs because other one steal all the CPU
  256. power, try increasing the priority.
  257. Otherwise, if this applet runs well and others slows down, decrease the
  258. priority. Consider the min priority is 1, normal priority is 5, and the
  259. max priority is 10. Usually a priority of 3 is ok for single applets.
  260.  
  261. The "MinSYNC" parameter must be set to a value between 8 and 16 to slow
  262. down animation in the case it runs too faster on faster computers or because
  263. the applet size is very small. The optimal value seems to be 10, but you can
  264. disable this feature placing a value of 0 if you see flickerings or excessive
  265. slow down.
  266. If the applets steal 100% of CPU power or slows down the browser and Operating
  267. System, try increasing MinSYNC until all runs ok.
  268. Usually values between 40 and 400 fixes all problems, even if applet slows
  269. down for compatibility.
  270.  
  271.                              ---------
  272.  
  273.  
  274. Copyright and distribution notices
  275.  
  276.  
  277. Fabio Ciucci is the author and owner of this applet.
  278. You can use freely this applet to enhance your web pages. But since I am
  279. the author of the applet, I placed a secret linkware window that will appear
  280. if the applet is clicked with mouse, only when the applet is online on a site:
  281. it is external to the web browser, so it will not hit the design of your
  282. beautyful html page.
  283. This small window will simply show my name and ask for a link to my java
  284. applets page.. the user can connect to it or cancel, or hide the window and
  285. connect after visiting all your pages.
  286. I hope this credit part is not a problem for you...
  287. In any case, if link is accepted a new browser window will appear and your
  288. page will remain on the original window, so you will not lost the visitor.
  289. Consider you will use an effect programmed by me, without pay, for FREE!
  290.  
  291. NOTE: You can include the applets archive on CD-ROMS or shareware collections
  292. and shareware sites without ask me, but only if you leave the archive(s)
  293. unchanged.
  294.  
  295.  
  296.                              ---------
  297.  
  298.  
  299. Fabio Ciucci (Randy/Ram Jam)
  300.  
  301. fabioc@anfiteatro.it
  302.  
  303. http://www.anfiteatro.it/java.html
  304.  
  305.  
  306.