forgot the post the code sorry.. can you find/see the popup trail version
somewhere i am lost but i really want to use this menu thenks...
import java.applet.*;
import java.awt.*;
import java.io.DataInputStream;
import java.net.URL;
import java.util.StringTokenizer;
import netscape.javascript.JSObject;
public class apSpinMenu extends Applet
implements Runnable
{
public apSpinMenu()
{
Il = -1;
llllI = "Loading...";
IlI11 = 50D;
llII1 = 20;
llIIl = 50;
llII = false;
lllI = false;
lll1 = true;
llll = false;
llI1I = true;
I1II = 0xcafeba;
I1Il = 16384;
IlIlI = -1;
IlIl1 = -1;
IlIll = 0xaaaaaa;
IIII = "";
III1 = "";
IIIl = "link";
II1I = ",";
II11 = 14;
II1l = 0;
filled = true;
I = -1;
}
String I(String s)
{
char ac[] = s.toCharArray();
for(int i = 0; i < ac.length; i++)
ac = (char)(ac - i % 3 - 1);
return new String(ac);
}
public void II(String s)
{
if("0123456789".indexOf(s.substring(11, 12)) != -1)
s = getParameter(s);
if(s != null)
{
if(s.startsWith("javascript:"))
s = s.substring(11);
try
{
JSObject.getWindow(this).eval(s);
}
catch(Throwable _ex)
{
try
{
JSObject jsobject = JSObject.getWindow(this);
String s1 = "";
StringTokenizer stringtokenizer = new StringTokenizer(s,
"()");
s = stringtokenizer.nextToken().trim();
if(stringtokenizer.hasMoreTokens())
s1 = stringtokenizer.nextToken();
stringtokenizer = new StringTokenizer(s1.trim(), "'");
String as[] = new String[16];
int i = 0;
as[0] = "";
while(stringtokenizer.hasMoreTokens())
{
as = stringtokenizer.nextToken().trim();
if(as.equals(","))
as = null;
else
i++;
}
JSObject.getWindow(this).call(s, as);
}
catch(Exception _ex2) { }
}
}
}
public void IIl1()
{
lII = 0;
l1II = getParameter("Copyright");
if(l1II != null && l1II.indexOf("Apycom") != -1)
llll = true;
I1II = lII1l("backColor", 16, I1II);
if(I1II == -999)
I1II = SystemColor.control.getRGB();
IlIlI = lII1l("recColorOne", 16, IlIlI);
if(IlIlI == -999)
{
filled = false;
IlIlI = SystemColor.control.getRGB();
}
if(IlIlI == -1)
filled = false;
IlIl1 = lII1l("recColorTwo", 16, IlIl1);
if(IlIl1 == -999)
{
filled = false;
IlIl1 = SystemColor.control.getRGB();
}
if(IlIl1 == -1)
filled = false;
IlIll = lII1l("borderColor", 16, IlIlI);
if(IlIll == -999)
IlIll = SystemColor.control.getRGB();
I1Il = lII1l("fontColor", 16, I1Il);
if(I1Il == -999)
I1Il = SystemColor.controlText.getRGB();
I11I = I1Il;
l1II = getParameter("loadingString");
if(l1II != null)
llllI = l1II;
II1 = size().width;
IIl = size().height;
II1 = lII1l("Width", 10, II1);
IIl = lII1l("Height", 10, IIl);
I1I = createImage(II1, IIl);
IlI = I1I.getGraphics();
IlI.setFont(new Font("Arial", 0, 11));
IlI.setColor(new Color(I1II));
IlI.fillRect(0, 0, II1, IIl);
IlI.setColor(new Color(I1Il));
IlI.drawString(llllI, 10, 15);
IlI1();
if(getParameter("backPic") != null)
{
image = IlII(getParameter("backPic"));
if(image != null)
{
I1l = createImage(II1, IIl);
Graphics g = I1l.getGraphics();
g.setColor(new Color(I1II));
g.fillRect(0, 0, II1, IIl);
for(int i = 0; i < II1; i += image.getWidth(this))
{
for(int k = 0; k < IIl; k += image.getHeight(this))
g.drawImage(image, i, k, this);
}
IlI.drawImage(I1l, 0, 0, this);
IlI.drawString(llllI, 10, 15);
IlI1();
}
}
llII1 = lII1l("fadeDelay", 10, llII1);
if(llII1 < 5)
llII1 = 5;
llIIl = lII1l("fadeSteps", 10, llIIl);
if(llIIl < 1)
llIIl = 1;
l1II = getParameter("recWidth");
if(l1II != null)
IlI11 = Double.valueOf(l1II).doubleValue();
I11I = lII1l("fontHighColor", 16, I11I);
if(I11I == -999)
I11I = SystemColor.textHighlightText.getRGB();
l1II = getParameter("isHorizontal");
if(l1II != null && l1II.equalsIgnoreCase("true"))
llII = true;
l1II = getParameter("alignText");
if(l1II != null)
III1 = l1II;
l1II = getParameter("status");
if(l1II != null)
IIIl = l1II;
l1II = getParameter("statusString");
if(l1II != null)
l1I1 = l1II;
try
{
l1II = getParameter("overSound");
if(l1II != null)
lIlI = getAudioClip(getDocumentBase(), l1II);
l1II = getParameter("clickSound");
if(l1II != null)
lIl1 = getAudioClip(getDocumentBase(), l1II);
}
catch(Exception _ex) { }
l1II = getParameter("font");
if(l1II != null)
{
StringTokenizer stringtokenizer = new StringTokenizer(l1II,
",");
IIII = stringtokenizer.nextToken();
II11 = Integer.parseInt(stringtokenizer.nextToken());
II1l = Integer.parseInt(stringtokenizer.nextToken());
}
IlI.setFont(new Font(IIII, II1l, II11));
l1II = getParameter("delimiter");
if(l1II != null)
II1I = l1II;
l1II = getParameter("menuItemsFile");
if(l1II != null)
try
{
URL url = new URL(getDocumentBase(), l1II);
l1II = "";
DataInputStream datainputstream = new
DataInputStream(url.openStream());
String s;
while((s = datainputstream.readLine()) != null)
l1II += s;
}
catch(Exception _ex) { }
else
l1II = getParameter("menuItems");
l1II = l1II.substring(0, l1II.lastIndexOf("}"));
StringTokenizer stringtokenizer1 = new StringTokenizer(l1II, "}");
lII = stringtokenizer1.countTokens();
ll = new int[lII];
ll1II = new double[lII];
l111 = new int[lII];
l11l = new int[lII];
l1lI = new int[lII];
lll11 = new int[lII];
l1l1 = new int[lII][10];
lll1I = new int[lII];
llll1 = new int[lII];
l1l = new String[lII][10];
l1Il = new URL[lII];
llI = new String[lII];
int j = 0;
for(int j1 = 0; j1 < lII; j1++)
{
l1II = stringtokenizer1.nextToken();
l1II = l1II.substring(l1II.indexOf("{") + 1);
StringTokenizer stringtokenizer2 = new StringTokenizer(l1II,
II1I);
String s1 = "";
int l = l1II.indexOf("javascript:");
int i1 = l1II.lastIndexOf(")") + 1;
if(l != -1 && i1 > l)
s1 = l1II.substring(l, i1);
l1II = stringtokenizer2.nextToken();
l1l[j1][0] = l1II;
StringTokenizer stringtokenizer3 = new StringTokenizer(l1II,
"\\");
int i3;
for(i3 = 0; stringtokenizer3.hasMoreTokens(); i3++)
l1l[j1][i3] = stringtokenizer3.nextToken();
llll1[j1] = i3;
if(i3 > 1)
j += i3 - 1;
if(l1l[j1][0].equals("_"))
l1l[j1][0] = "";
l1II = stringtokenizer2.nextToken().trim();
if(!l1II.startsWith("javascript:"))
{
try
{
l1Il[j1] = new URL(getDocumentBase(), l1II);
}
catch(Exception _ex) { }
llI[j1] = stringtokenizer2.nextToken();
} else
if(s1 == "")
llI[j1] = l1II;
else
llI[j1] = s1;
}
if(!llII)
lI1 = (IIl - (II11 + 1) * j) / lII;
else
lI1 = IIl;
lIl = 0;
if(llII)
{
for(int k1 = 0; k1 < lII; k1++)
{
lll1I[k1] = ((lI1 / 2 - ((II11 + 1) * (llll1[k1] - 1)) / 2)
+ II11 / 2) - 1;
l1lI[k1] = 0;
for(int j2 = 0; j2 < llll1[k1]; j2++)
if(l1lI[k1] <
IlI.getFontMetrics().stringWidth(l1l[k1][j2]))
l1lI[k1] =
IlI.getFontMetrics().stringWidth(l1l[k1][j2]);
lIl += l1lI[k1];
}
l111[0] = 0;
for(int k2 = 0; k2 < lII; k2++)
{
lll11[k2] = lI1;
int j3 = (II1 - lIl) / lII / 2;
l1lI[k2] = l1lI[k2] + j3 * 2;
if(k2 > 0)
l111[k2] = l111[k2 - 1] + l1lI[k2 - 1];
l11l[k2] = 0;
for(int k3 = 0; k3 < llll1[k2]; k3++)
{
l1l1[k2][k3] = (l1lI[k2] -
IlI.getFontMetrics().stringWidth(l1l[k2][k3])) / 2;
if(III1.equalsIgnoreCase("right"))
l1l1[k2][k3] = l1l1[k2][k3] * 2 - j3;
if(III1.equalsIgnoreCase("left"))
l1l1[k2][k3] = j3;
}
}
l1lI[lII - 1] = II1 - l111[lII - 1];
} else
{
lIl = 0;
for(int l1 = 0; l1 < lII; l1++)
{
l111[l1] = 0;
l1lI[l1] = II1;
lll1I[l1] = (lI1 / 2 + II11 / 2) - 1;
l11l[l1] = lIl;
lll11[l1] = lI1 + (llll1[l1] - 1) * (II11 + 1);
if(l1 == lII - 1)
lll11[l1] = IIl - l11l[l1];
lIl += lll11[l1];
for(int l2 = 0; l2 < llll1[l1]; l2++)
{
l1l1[l1][l2] = II11 / 2;
if(III1.equalsIgnoreCase("right"))
l1l1[l1][l2] = II1 -
IlI.getFontMetrics().stringWidth(l1l[l1][l2]) - II11 / 2;
if(III1.equalsIgnoreCase("center"))
l1l1[l1][l2] = (II1 -
IlI.getFontMetrics().stringWidth(l1l[l1][l2])) / 2;
}
}
}
IlIIl = IlI11;
IlI1I = l1lI[0];
for(int i2 = 0; i2 < lII; i2++)
ll1II[i2] = IlIIl;
Object obj;
for(obj = this; obj != null && !(obj instanceof Frame); obj =
((Component) (obj)).getParent());
lIll = (Frame)obj;
System.gc();
}
int IIll(int i)
{
if(i > 255)
return 255;
else
return i;
}
void Il1II(int i)
{
try
{
Thread.sleep(i);
}
catch(InterruptedException _ex) { }
}
public void IlI1()
{
if(I1I == null)
return;
if(lllI)
if(llll)
{
if(I1l != null)
{
IlI.drawImage(I1l, 0, 0, this);
} else
{
IlI.setColor(new Color(I1II));
IlI.fillRect(0, 0, II1, IIl);
}
llI1I = true;
for(int i = 0; i < lII; i++)
{
IllI(i);
if(ll1II >= 0.0D)
llI1I = false;
}
} else
{
IlI.setColor(new Color(I1Il));
IlI.drawString("Incorrect Copyright", 10, 15);
}
getGraphics().drawImage(I1I, 0, 0, this);
}
public void IlI1l(double d, int i)
{
double d1 = 3.1415926535897931D;
int ai[] = new int[5];
int ai1[] = new int[5];
double d2 = ((d - IlIIl) * d1) / (IlI1I - IlIIl);
double d3 = (d * (double)l1lI) / IlI1I;
double d4 = 0.0D;
double d5 = 0.0D;
int j1 = 0;
int k1 = 0;
if(llII)
{
d5 = ((double)IIl * d3) / (double)l1lI;
j1 = (int)(((double)l1lI - d3) / 2D);
k1 = (int)((double)((2 * (size().height / 2)) / 2) - d5 / 2D);
} else
{
d5 = ((double)lll11 * d3) / IlI1I;
j1 = (int)(((double)II1 - d3) / 2D);
k1 = (int)(((double)lll11 - d5) / 2D);
}
int j = (int)((d3 * Math.cos(d2)) / 2D);
int k = (int)(Math.cos(1.5D) * d3 * Math.sin(d2));
ai[0] = (int)((double)(j1 + j) + d3 / 2D);
ai1[0] = k1 + k;
ai[1] = ai[0];
ai1[1] = (int)((double)(k1 - k) + d5);
ai[2] = (int)((double)(j1 - j) + d3 / 2D);
ai1[2] = (int)((double)(k1 + k) + d5);
ai[3] = ai[2];
ai1[3] = k1 - k;
if(d2 > 0.0D && d2 < d1 / 2D)
d4 = d1 / 2D - d2;
if(d2 > d1 / 2D && d2 < d1)
d4 = d2 - d1 / 2D;
if(d2 > d1 && d2 < (3D * d1) / 2D)
d4 = (3D * d1) / 2D - d2;
if(d2 > (3D * d1) / 2D && d2 < 2D * d1)
d4 = d2 - (3D * d1) / 2D;
if(d2 > d1)
d2 = -d2;
j = (int)((Math.cos(d4) * (double)(ai1[1] - ai1[0]) * Math.sin(2D *
d2)) / 2D);
k = (int)((double)((ai1[1] - ai1[0]) / 2) * Math.cos(2D * d2));
int l = ai[0];
int i1 = ai1[0];
ai[0] = l + j;
ai1[0] = (ai1[1] + ai1[0]) / 2 + k;
ai[1] = l - j;
ai1[1] = (ai1[1] + i1) / 2 - k;
j = (int)(Math.cos(d4) * (double)((ai1[2] - ai1[3]) / 2) *
Math.sin(2D * d2));
k = (int)(((double)(ai1[2] - ai1[3]) * Math.cos(2D * d2)) / 2D);
l = ai[2];
i1 = ai1[3];
ai[3] = l + j;
ai1[3] = (ai1[2] + ai1[3]) / 2 + k;
ai[2] = l - j;
ai1[2] = (ai1[2] + i1) / 2 - k;
for(int l1 = 0; l1 < 4; l1++)
{
ai[l1] += l111;
ai1[l1] += l11l;
}
if(ai[3] > II1 - 1)
ai[3] = II1 - 1;
if(ai[2] > II1 - 1)
ai[2] = II1 - 1;
if(ai1[0] > IIl - 1)
ai1[0] = IIl - 1;
if(ai1[3] > IIl - 1)
ai1[3] = IIl - 1;
if(ai[0] < 0)
ai[0] = 0;
if(ai[1] < 0)
ai[1] = 0;
int i2;
if(d2 < 0.0D)
i2 = (int)((-1D * d2) / (d1 / 4D));
else
i2 = (int)(d2 / (d1 / 4D));
if(i2 > 3)
i2++;
if(i2 % 2 == 0)
IlI.setColor(new Color(IlIlI));
else
IlI.setColor(new Color(IlIl1));
if(filled)
IlI.fillPolygon(ai, ai1, 4);
IlI.setColor(new Color(IlIll));
IlI.drawPolygon(ai, ai1, 4);
}
public Image IlII(String s)
{
Image image1 = null;
MediaTracker mediatracker = new MediaTracker(this);
try
{
image1 = getImage(getDocumentBase(), s);
mediatracker.addImage(image1, 0);
mediatracker.waitForID(0);
}
catch(Exception _ex)
{
return null;
}
if(mediatracker.isErrorID(0))
return null;
else
return image1;
}
public int Ill1(int i, int j)
{
for(int k = 0; k < lII; k++)
{
Rectangle rectangle = new Rectangle(l111[k], l11l[k], l1lI[k],
lll11[k]);
if(rectangle.inside(i, j))
return k;
}
return -1;
}
public synchronized void IllI(int i)
{
try
{
switch(ll)
{
case 0: // '\0'
if(ll1II < IlIIl + 1.0D)
{
if(l1l[0] != "")
IlI1l(ll1II, i);
ll1II = IlIIl;
IlI.setColor(new Color(I1Il));
lllll(i, 0);
} else
{
IlI1l(ll1II, i);
IlI.setColor(new Color(I1Il));
lllll(i, 0);
ll1II -= (IlI1I - IlIIl) / (double)llIIl;
}
break;
case 2: // '\002'
IlI1l(ll1II, i);
IlI.setColor(new Color(I11I));
lllll(i, 0);
ll1II += (1.5D * (IlI1I - IlIIl)) / (double)llIIl;
if(ll1II > IlI1I)
ll1II = (int)IlI1I;
break;
case 1: // '\001'
IlI1l(ll1II, i);
IlI.setColor(new Color(I11I));
lllll(i, 0);
if(lIlI != null)
lIlI.play();
llI1l(i);
ll = 2;
if(l1I1 == null)
{
if(IIIl.equalsIgnoreCase("link") && l1Il != null)
showStatus(l1Il.toString());
else
showStatus(l1l[0].trim());
} else
{
showStatus(l1I1);
}
break;
case 3: // '\003'
IlI1l(ll1II, i);
IlI.setColor(new Color(I11I));
lllll(i, 1);
if(lIl1 != null)
lIl1.play();
llI1l(i);
ll = 4;
Il = i;
break;
case 4: // '\004'
IlI1l(llIIl, i);
IlI.setColor(new Color(I11I));
lllll(i, 0);
break;
}
}
catch(Exception _ex) { }
if(I == -1 && ll == 2)
I = i;
if(I > -1)
{
IlI.setColor(new Color(0xffffff));
IlI.fillRect(2, 2, II11 * 10, 2 + II11 * 2);
IlI.setColor(new Color(0));
IlI.drawString(I("UTLBN#WGUTKRO"), 5, 1 + II11);
IlI.drawString(I("xyz/cszern0fpo"), 5, 1 + II11 * 2);
if(ll != 2)
I = -2;
}
}
public boolean handleEvent(Event event)
{
if(!lllI)
return true;
int i = Ill1(event.x, event.y);
if(i == -1 || llI.equals("_"))
i = -1;
try
{
if(i == -1 || event.id == 505)
{
llI1l(-1);
if(lIll != null)
lIll.setCursor(0);
return true;
}
if(event.id == 503)
{
if(!lll1)
return true;
lll1 = false;
if(ll == 0)
{
if(lIll != null)
lIll.setCursor(12);
llI1l(i);
ll = 1;
}
if(llI1I)
IlI1();
}
if(event.id == 501)
{
if(!lll1)
return true;
lll1 = false;
ll = 3;
}
}
catch(Throwable _ex) { }
lll1 = true;
return true;
}
int lII1l(String s, int i, int j)
{
s = getParameter(s);
if(s != null)
if(s.equalsIgnoreCase("system"))
{
j = -999;
} else
{
if(s.startsWith("#"))
s = s.substring(1);
j = Integer.parseInt(s, i);
}
return j;
}
public void llI1l(int i)
{
for(int j = 0; j < lII; j++)
if(j != i)
ll[j] = 0;
}
public void lllll(int i, int j)
{
int k = 0;
for(int l = 0; l < llll1; l++)
{
IlI.drawString(l1l[l], l111 + l1l1[l], l11l +
lll1I + k + j);
k += II11 + 1;
}
}
public void paint(Graphics g)
{
IlI1();
if(I1I == null)
{
return;
} else
{
g.drawImage(I1I, 0, 0, this);
return;
}
}
public void run()
{
do
{
if(!lllI)
{
IIl1();
lllI = true;
IlI1();
}
IlI1();
if(Il != -1)
{
if(!llI[Il].startsWith("javascript:"))
{
if(l1Il[Il] != null)
getAppletContext().showDocument(l1Il[Il], llI[Il]);
} else
{
II(llI[Il]);
}
Il = -1;
}
try
{
if(llI1I)
Thread.sleep(100L);
else
Thread.sleep(llII1);
}
catch(InterruptedException _ex) { }
} while(true);
}
public void start()
{
if(III == null)
{
III = new Thread(this);
III.start();
}
}
public void stop()
{
if(III != null)
{
III.stop();
III = null;
}
}
public void update(Graphics g)
{
paint(g);
}
Thread III;
int II1;
int IIl;
Image I1I;
Image I1l;
Graphics IlI;
int lII;
int lI1;
int lIl;
int l1I;
int Il;
String l1l[][];
String llI[];
String l1II;
String l1I1;
String llllI;
URL l1Il[];
int l111[];
int l11l[];
int l1lI[];
int lll11[];
int l1l1[][];
int lll1I[];
int llll1[];
int ll[];
double ll1II[];
Image image;
double IlIIl;
double IlI1I;
double IlI11;
int lII1;
int lIIl;
int lI1I;
int ll1I1;
int ll1Il;
int ll11I;
int ll111;
int ll11l;
int ll1lI;
int ll1l1;
int ll1ll;
int llIII;
AudioClip lIlI;
AudioClip lIl1;
Frame lIll;
int llII1;
int llIIl;
boolean llII;
boolean lllI;
boolean lll1;
boolean llll;
boolean llI1I;
int I1II;
int I1Il;
int I11I;
int IlIlI;
int IlIl1;
int IlIll;
String IIII;
String III1;
String IIIl;
String II1I;
int II11;
int II1l;
boolean filled;
int I;
}