internet.com logo The Java Boutique Web Marketers' Online Facts
 APPLETS
by Author
by Category
by Date
by Name
Hall of Fame
Archive
Submit Applets
Source Code
for Programmers
 ARTICLES
Tutorials
Reviews
Glossary
Programmers'
   Corner
Webmasters'
   Corner
 FORUM
FAQ
Users Poll
Discussion Group
Contact Us
 OTHER RESOURCES
Development Tools
Java Books
Custom Applets
Java News
Jini Watch

internet.com
:Internet News
:Internet Stocks
:Internet Technology
:Web Developer
:Internet Marketing
:ISP
:Downloads
:Internet Resources
:International

:Search internet.com
:Advertising Info
:Corporate Info
:Internet Trade Shows

internet.
commerce
:Be an Affiliate
:Software Store
:Computer Help
:Register a Domain
:Be Domain Registrar
:Travel
:Banking
:e-solutions
:Internet Jobs
:A/V Network
:Rent E-mail Lists
:Bookstore
:Press Release dist.
:Sell Ad Space
:Internet Research
:Venture Capital
:Web Publishing
:Build Your Intranet

WebDeveloper Network
BrowserWatch
Developer Forums
Developer News
JavaBoutique
JavaScriptSource
ScriptSearch
SearchEngineWatch
StreamingMediaWorld
The WDVL
WebDeveloper.com
WebDevelopersJournal WebReference.com
The XML Files

Get your 3.9˘nternet.com MasterCard!

3DPhotoCube


Before adding the applet code to your HTML pages, you must ensure that all the "class" files required to run the applet are located in the same directory or folder as the HTML document (Web page) on which you will be placing the applet. (Class files are the actual Java* code files.) Class files end in the extension: .class. There may be one or several per applet depending on the applet. Also, all image and text files referenced by the applet must be located in that same directory as well. This is true regardless of whether you are running the applet "locally" on your own computer or whether you are running it from your Web server space. Image files end in the extension: .jpg or .gif. Text files end in the extension: .txt.

You can add the 3D Photo Cube to your pages by following these simple steps:

A.Open your HTML document in a text editor like Notepad.*

B.Select the code below and then copy it to your clipboard by selecting "Copy" from the Edit menu. (Useful Hint: Control+"c" will copy the selected area and Control+"v" will paste.)


<APPLET CODE="image3dcube.class" WIDTH=250 HEIGHT=250>
<PARAM name="background" value="FFFFFF">
<PARAM name="shadowcolor" value="FFFFFF">
<PARAM name="textcolor" value="000000">
<PARAM name="spotlight" value="no">
<PARAM name="showlightbutton" value="no">
<PARAM name="sleeptime" value="5">
<PARAM name="target" value="_self">
<PARAM name="anglestep" value="8">
<PARAM name="mouseresponse" value="6">
<PARAM name="zoomspeed" value="5">
<PARAM name="image0" value="image1.jpg">
<PARAM name="image1" value="image2.jpg">
<PARAM name="image2" value="image3.jpg">
<PARAM name="image3" value="image4.jpg">
<PARAM name="image4" value="image5.jpg">
<PARAM name="image5" value="image6.jpg">
<PARAM name="url0" value="http://www.intel.com">
<PARAM name="url1" value="http://www.intel.com">
<PARAM name="url2" value="http://www.intel.com">
<PARAM name="url3" value="http://www.intel.com">
<PARAM name="url4" value="http://www.intel.com">
<PARAM name="url5" value="http://www.intel.com">
</APPLET> <script language="JavaScript">
var url = "<img src=http://www.intel.com/cpc/webapplets/pix/spacer.gif" +
"?iid=iwa+photocube&" + ">";
if (window.location.href.indexOf("http://") == 0)
document.write(url);
else document.write("<img src=\"spacer.gif\">");
</script>
<noscript>
<img SRC="http://www.intel.com/cpc/webapplets/pix/spacer.gif?iid=iwa+photocube&">
</noscript>

...and insert, or "paste" it in the location of your HTML code where you wish to insert your applet (it must be between the "<Body>" and the "</Body>" tags).

Please help us see how popular this applet is by including the brief java script at the bottom of the Applet code in your html file. This code will not affect your applet's performance, it will simply tell us how many times the applet was used on the Internet.

Now that you’ve added the 3D Photo Cube code to your page, you must customize your applet by selecting a background color and choosing which images you wish you want to include in your cube. This is much more simple than you'd think. Read on to find out how...

How to Customize your 3D Photo Cube

Below is the HTML source code for the 3D Photo Cube applet. Don't worry if you don't understand all of it, the main parts that you need to be concerned with are the segments in bold lettering. These are the parts (or parameters) that you can change so that you can personalize your 3D Photo Cube. Take a quick look at the code, then skip down to the first feature, "Adding your own images".


<APPLET CODE="image3dcube.class" WIDTH=250 HEIGHT=250>
<PARAM name="background" value="FFFFFF">
<PARAM name="shadowcolor" value="FFFFFF">
<PARAM name="textcolor" value="000000">
<PARAM name="spotlight" value="no">
<PARAM name="showlightbutton" value="no">
<PARAM name="sleeptime" value="5">
<PARAM name="target" value="_self">
<PARAM name="anglestep" value="8">
<PARAM name="mouseresponse" value="6">
<PARAM name="zoomspeed" value="5">
<PARAM name="image0" value="image1.jpg">
<PARAM name="image1" value="image2.jpg">
<PARAM name="image2" value="image3.jpg">
<PARAM name="image3" value="image4.jpg">
<PARAM name="image4" value="image5.jpg">
<PARAM name="image5" value="image6.jpg">
<PARAM name="url0" value="http://www.intel.com">
<PARAM name="url1" value="http://www.intel.com">
<PARAM name="url2" value="http://www.intel.com">
<PARAM name="url3" value="http://www.intel.com">
<PARAM name="url4" value="http://www.intel.com">
<PARAM name="url5" value="http://www.intel.com">
</APPLET> <script language="JavaScript">
var url = "<img src=http://www.intel.com/cpc/webapplets/pix/spacer.gif" +
"?iid=iwa+photocube&" + ">";
if (window.location.href.indexOf("http://") == 0)
document.write(url);
else document.write("<img src=\"spacer.gif\">");
</script>
<noscript>
<img SRC="http://www.intel.com/cpc/webapplets/pix/spacer.gif?iid=iwa+photocube&">
</noscript>

IMPORTANT! If you change parameter code other than the parts listed in Bold in these examples, your applet may not work properly.

Adding your own images

Before you can use your 3D Photo Cube, you must select the images you want to use in the cube.

<PARAM name="image0" value="image1.jpg">

This line defines which image to place on the first face of the cube. In place of "image1.jpg", you should place the name of your image file. The applet accepts both GIF and JPEG/JPG files. If you do not know the name of your image files, go into Windows Explorer or File Manager depending on your operating system and look for files that end in the suffix .jpg or .gif. To find out more on how to get images into your computer click here.

You can select up to six images to include in the cube. If you do not have that many, you can use the same image more than once. Using the same image multiple times will also make the download smaller for your visitors. The images are automatically resized to fit a square so you do not have to worry about rescaling the image. Please note however, the further the image is away from looking like a square at the start, the more distorted the image will appear on the face of the cube. If you have the ability and the software to resize or crop your images into a square, then we recommend that you do so to prevent image distortion.

Very Important!

Be certain to place the images that you have chosen to use in the applet into the same directory or folder as the applet class file(s) as well as the HTML file that contains the applet code. This is true whether you are running the applet "locally" on your computer, or whether you are running it from your Internet Service Provider. If your images are not in the same folder as the applet class files and HTML file, the applet will not run. Also, check to make sure that the image names used in the applet's HTML code are identical in spelling and case (upper vs. lower case) as those that you have placed in your folder.

Linking to Your Cube Faces

Each cube face can be used as a link to another Web page. By double clicking on the cube face your visitors will be sent to the Web page that you have defined for that cube face. For example, the line below says that the URL link for the first image will be to "http://www.intel.com".

<PARAM name="url0" value="http://www.intel.com">

Just remember to keep the links in the same order as the your images starting from "url0"

<PARAM name="url0" value="http://www.intel.com"> <PARAM name="url1" value="http://www.intel.com">

<PARAM name="url2" value="http://www.intel.com">

Changing the Background and Shadow Color

Here is the line that defines the background color of your 3D Photo Cube:

<PARAM name="background" value="ffffff"> Important! Please note that in Java*, you do not use the "#" symbol prior to the color code as you would for an HTML page.

To change to any other color simply change the code in bold to match your page’s look and feel. If you are unfamiliar with "hexadecimal" color codes, then click here to find out more.

The shadow color value can be changed in the same way.

Changing other parameters (Advanced Settings)

While the default settings are fine for most purposes, some of the applet's other parameters may be changed as well. Below explanations of how you can customize these.

<PARAM name="textcolor" value="000000"> (hex number)

RGB color code in hexadecimal notation (similar to the way background color is handled). Determines what color the "Loading Image 1,2,3…" message is.

<PARAM name="spotlight" value="no" "spotlight"> ("yes", "no")

Indicates whether the spotlight is on or off when the applet starts.

<PARAM name="target" value="_self" "target" ("_self", "_parent", "_top", "_blank", "name of a frame")

This parameter sets the target frame where the linked page should be loaded. If you use frames then write the name of the target frame as the value, but you can also choose between: "_self" to load in the current frame "_parent" to load in the parent frame "_top" to load in the top-most frame "_blank' to load in a new unnamed top-level window

IMPORTANT! Once you have customized your applet to your satisfaction, you should test the applet by running it on your local computer before uploading or sending your files to your web server space at your Internet service provider. Remember, in order for your applet to perform correctly, all files associated with your applet must be uploaded to the same directory or folder within your web server space. This includes all html files, class files, and image files.

If you are having difficulty getting your applet to work, check out the FAQs, which address many of the common mistakes that occur when installing this applet.

Back to the 3DPhotoCube applet page


Applet Index
(sorted alphabetically)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z #s
The Java Source
(applets w/source code)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z

New on the Java Boutique:

New Feature: Q and A with Selena Sol
The author of the JavaBoutiques Introduction to Java answers users' questions about Java and the Internet.

New Section: JavaBoutique Book Reviews
A list of popular Java Books with summaries and ratings.

New Article: Introduction to Java
Each month, we will post a new installment of this online Java course from Selena Sol. This series of articles is intended for beginner programmers who want to learn Java quickly and easily. The latest installment: Object-Oriented Design.

New Feature: Applets for Programmers
A list of applets that are great learning tools for programmers.

New Feature: JavaBoutique User's Poll
Let us know what you think! The poll will have a new question each week.

New Section: JavaBoutique Discussion Group
This virtual bulletin board is for readers of the JavaBoutique to ask and answer questions about applets at javaboutique.com, to comment on articles, and to share their Java-related experiences.

Get your 3.9˘nternet.com MasterCard!

Copyright 1999 internet.com Corporation
All Rights Reserved. Legal Notices.