Jenniferann20
10-04-2001, 05:34 AM
I cant figure out how to get two java rollover buttons to both work on the same page. two different jave rollover buttons. Does anyone know what I can do? I make them in photo impact 6. They are one this page at geocities.
at the bottom
http://passionswd.cjb.net go to buttons and scroll to the bottom there is a heart and a square kinda but only one will work they wont both work together. Why?
crazyjls7890
10-04-2001, 09:25 PM
can i see the code please? because icant veiw your site :P
Jenniferann20
10-04-2001, 10:04 PM
for the first button:
<TITLE>PhotoImpact Rollover Assistant----heartjavarover</TITLE>
<Script Language="JavaScript">
<!--Ulead(R) RollOverButton(TM) 1.0 Generated JavaScript. Please do not edit.
nMaxItem = 4;
NameIndex = 0;
DefaultState = 1;
MouseOverState = 2;
MouseDownState = 3;
imgCounter = 0;
ImageList = new Array();
bIsSupportOK = (
((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) ||
((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
);
function AddImageToImageList(name, Default, MouseOver, MouseDown)
{
ImageList[imgCounter] = new Array(nMaxItem);
ImageList[imgCounter][NameIndex] = name;
ImageList[imgCounter][DefaultState] = new Image();
ImageList[imgCounter][DefaultState].src = Default;
if (MouseOver != "") {
ImageList[imgCounter][MouseOverState] = new Image();
ImageList[imgCounter][MouseOverState].src = MouseOver;
}
if (MouseDown != "") {
ImageList[imgCounter][MouseDownState] = new Image();
ImageList[imgCounter][MouseDownState].src = MouseDown;
}
imgCounter++;
}
function ReplaceImage(name, state)
{
for (i = 0; i < imgCounter; i++) {
if (document.images[ImageList[i][NameIndex]] != null) {
if ((name == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
document.images[name].src = ImageList[i][state].src;
}
}
}
// ------------
// . First:
// . You can copy the "AddImageToImageList(...)" script and
// . paste it into your HTML file to compile and
// . define your rollover button.
// . ------------
AddImageToImageList("tag_heartjavarover", "heartjavarover_normal.jpg", "heartjavarover_over.jpg", "heartjavarover_down.jpg");
// ------------>
</Script>
<BODY>
<! ------------
// . Second:
// . You can copy the "<a href=......></a>" script and
// . paste it into your HTML file to compile and
// . define your rollover button.
------------>
<A HREF=""
ONMOUSEDOWN="if (bIsSupportOK) ReplaceImage('tag_heartjavarover', MouseDownState);"
ONMOUSEUP="if (bIsSupportOK) ReplaceImage('tag_heartjavarover', MouseOverState);"
ONMOUSEOUT="if (bIsSupportOK) ReplaceImage('tag_heartjavarover',DefaultState);wi ndow.status=window.defaultStatus;return true"
ONMOUSEOVER="if (bIsSupportOK) ReplaceImage('tag_heartjavarover', MouseOverState); window.status='';return true;"
TARGET="">
<IMG NAME="tag_heartjavarover" SRC="heartjavarover_normal.jpg" ALT="" WIDTH="102" HEIGHT="42" BORDER="0"></A>
<! ------------
// . Third:
// . It is important to note that after copying all the rollover button
// . JavaScript codes from the PhotoImpact Rollover Assistant,
// . all the image files needed for your rollover buttons
// . should be placed within your target folder as well.
------------>
for the second button:
<TITLE>PhotoImpact Rollover Assistant----ropinkbeigeround</TITLE>
<Script Language="JavaScript">
<!--Ulead(R) RollOverButton(TM) 1.0 Generated JavaScript. Please do not edit.
nMaxItem = 4;
NameIndex = 0;
DefaultState = 1;
MouseOverState = 2;
MouseDownState = 3;
imgCounter = 0;
ImageList = new Array();
bIsSupportOK = (
((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) ||
((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
);
function AddImageToImageList(name, Default, MouseOver, MouseDown)
{
ImageList[imgCounter] = new Array(nMaxItem);
ImageList[imgCounter][NameIndex] = name;
ImageList[imgCounter][DefaultState] = new Image();
ImageList[imgCounter][DefaultState].src = Default;
if (MouseOver != "") {
ImageList[imgCounter][MouseOverState] = new Image();
ImageList[imgCounter][MouseOverState].src = MouseOver;
}
if (MouseDown != "") {
ImageList[imgCounter][MouseDownState] = new Image();
ImageList[imgCounter][MouseDownState].src = MouseDown;
}
imgCounter++;
}
function ReplaceImage(name, state)
{
for (i = 0; i < imgCounter; i++) {
if (document.images[ImageList[i][NameIndex]] != null) {
if ((name == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
document.images[name].src = ImageList[i][state].src;
}
}
}
// ------------
// . First:
// . You can copy the "AddImageToImageList(...)" script and
// . paste it into your HTML file to compile and
// . define your rollover button.
// . ------------
AddImageToImageList("tag_ropinkbeigeround", "ropinkbeigeround_normal.jpg", "ropinkbeigeround_over.jpg", "ropinkbeigeround_down.jpg");
// ------------>
</Script>
<BODY>
<! ------------
// . Second:
// . You can copy the "<a href=......></a>" script and
// . paste it into your HTML file to compile and
// . define your rollover button.
------------>
<A HREF=""
ONMOUSEDOWN="if (bIsSupportOK) ReplaceImage('tag_ropinkbeigeround', MouseDownState);"
ONMOUSEUP="if (bIsSupportOK) ReplaceImage('tag_ropinkbeigeround', MouseOverState);"
ONMOUSEOUT="if (bIsSupportOK) ReplaceImage('tag_ropinkbeigeround',DefaultState); window.status=window.defaultStatus;return true"
ONMOUSEOVER="if (bIsSupportOK) ReplaceImage('tag_ropinkbeigeround', MouseOverState); window.status='';return true;"
TARGET="">
<IMG NAME="tag_ropinkbeigeround" SRC="ropinkbeigeround_normal.jpg" ALT="" WIDTH="94" HEIGHT="27" BORDER="0"></A>
<! ------------
// . Third:
// . It is important to note that after copying all the rollover button
// . JavaScript codes from the PhotoImpact Rollover Assistant,
// . all the image files needed for your rollover buttons
// . should be placed within your target folder as well.
------------>
crazyjls7890
10-04-2001, 10:46 PM
my goodness lol. Have you tried the script that's on lissa's site? It's a lot simpler
Jenniferann20
10-04-2001, 10:52 PM
no i have not but can i use the buttons I make in photo impact with that code, cause all the buttons do different things.
Jenniferann20
10-04-2001, 11:25 PM
ok these are my java buttons:
heartjavarover_normal.jpg
heartjavarover_over.jpg
heartjavarover_down.jpg
So how would i put this onto my page in geocities using Lissas code?
Her code has too many images, and i cant figure it out.
crazyjls7890
10-04-2001, 11:46 PM
you would just edit lissa's code to only do one image change. All you'd do is delete the part with the images you didnt leave and just leave the first one which i think is 'img0'
TheGorx
04-17-2003, 09:30 AM
Just in case anyone still wants to know
http://support.ulead.com/kb/0006/KB694.htm
http://www.ulead.com/learning/pi5/page1.htm
then you can also look at the script here for an example
http://www.ulead.com/learning/pi5/jsbuttons2.htm
then you can also move the script to a *.js file
cut between
<SCRIPT language=JavaScript>
and
</SCRIPT>
then replace
those lines with
<script type="text/javascript" src="script.js"></script>
providing that you named the text file you copied the script in script.js
its alot less stuff on the html file.
just thought I post this since I happened to be looking for this info and found it.
It beats the heck out of using hover button applets
Dude128
04-18-2003, 04:30 AM
please don't bring up really, really old threads :)
anything more than a week or so old won't be fresh in anyone's minds and they'll have to re-read the entire thread, and most likely the original poster won't care or need to know anymore