advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement


JRBall Configuration


Sections:

  1. Param Tags
  2. Files
  3. Sample Configuration
  4. Scoring

Param Tags:

There are 12 param tags.  They are:

    numballs
    holesize
    ballcolor1
    ballcolor2
    ballcolor3
    bgcolor
    fontcolor
    holeimage
    wallimage
    ballimage
    titleimage
    titlecaption

"numballs" simply specifies how many balls each game should start with.  If this is left out, it is set to five.

"holesize" specifies how many pixels square the hole in the back wall should be.  If this is left out, it is set to 50.

"ballcolor1", "ballcolor2", and "ballcolor3" specify the colors of the ball if "ballimage" isn't specified.  These must be RGB values without a '#' before it.  For example, for blue you would have "0000FF".  "ballcolor1" and "ballcolor2" are the two main colors while "ballcolor3" is the warning color.

"bgcolor" specifies the color of the background and walls.

"fontcolor" specifies the color of the font and lines drawing the walls.

"holeimage" specifies an image to be displayed in the area of the hole.  it is scaled to fit the "holesize".

"wallimage" specifies the image to be displayed on the back wall of the court.  It is tiled to fit.

"ballimage" specifies an image that should be used instead of the "ballcolor"s.  if both are specified, "ballimage" will still be displayed instead of the colors.  please note: with "ballimage" there is no warning when the ball is about to be lost.

"titleimage" specifies the image to be displayed at the top of the cover page.  it should be 125x125 pixels but a slight variance is alright.  this tag is very important and the game will not work without it.

"titlecaption" specifies the caption to appear under "titleimage".


Files:

There are five required files for the actual game.  They are JRBall.class, Location.class, wall.au, swing.au, and miss.au.  Each need to be in the same directory (folder) as your HTML page.  In addition to this, you need to have your image files for the wall, ball, etc. in that same directory.


Sample Configuration:

Here is a sample configuration for JRBall:

<APPLET CODE="JRBall.class" WIDTH="450" HEIGHT="300">
    <PARAM NAME="numballs" VALUE="8">
    <PARAM NAME="holesize" VALUE="25">
    <PARAM NAME="ballcolor1" VALUE="0000FF">
    <PARAM NAME="ballcolor2" VALUE="FF0000">
    <PARAM NAME="ballcolor3" VALUE="FFFF00">
    <PARAM NAME="bgcolor" VALUE="000000">
    <PARAM NAME="fontcolor" VALUE="FFFFFF">
    <PARAM NAME="holeimage" VALUE="hole.jpg">
    <PARAM NAME="wallimage" VALUE="backwall.jpg">
    <PARAM NAME="titleimage" VALUE="title.gif">
    <PARAM NAME="titlecaption" VALUE="Come on in to play JRBall!">
</APPLET>


Scoring:

In JRBall, the lower your score the better.  Here is how the score is calculated:

Action Points
Hitting ball 1
Click and miss 2
Losing ball 20

As you can see, it's really important not to lose balls.  A perfect score is equal to the number of balls the game starts with (i.e., if "numballs" = 10, perfect score = 10).

Back to JRBall

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Microsoft Visual Studio 2010 Showcase
 Avaya Developer Showcase
 MSDN Spotlight
 PHP for Windows Showcase
XML error: undefined entity at line 39
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Windows 7: From Beta to Final Code in One Year
Google Shows Off Chrome OS, Releases Source
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?
Fedora 12 Takes Aim at Linux Networking
Top Supercomputer Nearly Doubles in Speed
Fedora 12 Linux Tackles Virtualization
Apple Gives iPhone Developers App Status Tracker
Novell Sets OpenSUSE 11.2 Free

Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Exploring HTML 5's Audio/Video Multimedia Support
Overriding Virtual Functions? Use C++0x Attributes to Avoid Bugs.
Understanding the Cloud Computing Security Vulnerabilities
Cisco and IBM Target a Greener World
Upgrade to Visual Studio 2010 with the Ultimate Offer

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs