Emergency help? CS3 (AS 2 I think...)

hello everyone,
I am hoping I can help someone with a delivery deadline of
end of day today.
This is handed off to me with the hope that I can, but I am a
new AS
programmer, soooo...
There is an image gallery that loads thumbs from an xml file.
The thumbs are links, each opening a larger version while
"whiting out" the
center/thumb content.
Clicking on the larger image closes it and the thumbs
reappear.
BUGS
1. 1st thumb image isn't a link when swf loads
2. when a thumb is enlarged, it is no longer a link when it
is collapsed
back to the thumbs
3. sometimes there are links to thumbs exposed when a larger
image is loaded
a) result is that sometimes when collapsing a larger image a
new large
image loads instead of collapsing to the thumbs
Here is the code (any help appreciated - I am doing my best
now to trouble
shoot as well - but as stated, my knowledge is limited).
CODE
#include "lmc_tween.as"
var tnNr;
spacing = 6;
container._alpha = 0;
var curLength;
MovieClip.prototype.loadPic = function(pic, id, link) {
info.text = "";
this._alpha = 0;
this.loadMovie(pic);
temp = this._parent.createEmptyMovieClip("temp2", 998);
temp.onEnterFrame = function() {
var t = container.getBytesTotal(), l =
container.getBytesLoaded();
if (Math.round(l/t) == 1 && container._width != 0
container._height != 0) {
var w = container._width+spacing, h =
container._height+spacing;
border._alpha = 10;
border.resizeMe(w, h, id, link);
delete this.onEnterFrame;
//resize the image
MovieClip.prototype.resizeMe = function(w, h, id,link) {
var speed = 2.5;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 &&
Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
container._y = this._y-this._height/2+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
container._alpha += 5;
if (container._alpha>90) {
info.text = id;
container._alpha = 100;
//if there's an image in front, make it disappear on click
container.onRelease = function(){
container._alpha = 0;
border._alpha =
0;
info._alpha =
0;
//info.alphaTo(0,1.5);
container.unloadMovie(pic);
empty.alphaTo(0,1.5);
//if you right/control click the image, then open url
container.onReleaseOutside = function(){
getURL(link, "_blank")
delete this.onEnterFrame;
function galleryChoice(q) {
pArray = new Array();
tArray = new Array();
iArray = new Array();
linkArray = new Array()
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes
quote:
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
pArray.push(gallery.childNodes
.attributes.source);
tArray.push(gallery.childNodes.attributes.thumb);
iArray.push(gallery.childNodes
.attributes.title);
linkArray.push(gallery.childNodes.attributes.url);
delay = setInterval(makeButtons, 50);
my_xml.load("artist-galleries/fick_gallery.xml");
function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
var thb = th_nav.thmb.duplicateMovieClip("thmb"+i,
1000+i);
thb.id = i;
thb._x = i%4*118;
thb._y = Math.floor(i/4)*118;
loadButtons();
function loadButtons() {
var tbox = th_nav["thmb"+tnNr].box;
tbox.loadMovie(tArray[tnNr]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
if (bt == bl && bt>5) {
nextButton();
delete this.onEnterFrame;
function nextButton() {
if (tnNr<tArray.length-1) {
tnNr++;
loadButtons();
} else {
activateButtons();
border._alpha = 0;
//activate buttons
function activateButtons() {
mainButtons();
for (var i = 0; i<pArray.length; i++) {
var but = th_nav["thmb"+i];
but.id = i;
//on button click
but.onRelease = function() {
disButtons2(this.id);
border._alpha = 100;
info._alpha = 100;
empty.loadMovie("white.swf");
empty.alphaTo(100,1);
container.loadPic(pArray[this.id],
iArray[this.id], linkArray[this.id]);
container.swapDepths(this._x +
this._y*isoPlane_width);
/* container.loadPic(pArray[0], iArray[0],linkArray[0]);*/
disButtons2(0);
butArray = new Array();
butArray = ["gal1_btn", "gal2_btn"];
//on gallery button click
function mainButtons() {
for (var i = 0; i<butArray.length; i++) {
this[butArray
].id = i;
this[butArray].onRelease = function() {
galleryChoice(this.id);
disButtons(this.id);
container.alphaTo(0,2);
info.alphaTo(0,2);
border.alphaTo(0,2);
empty.unloadMovie("white.swf");
function disButtons2(d) {
for (var i = 0; i<tArray.length; i++) {
if (i != d) {
this.th_nav["thmb"+i].enabled = 1;
this.th_nav["thmb"+i].box._alpha = 100;
} else {
this.th_nav["thmb"+i].enabled = 0;
this.th_nav["thmb"+i].box._alpha = 100;
function disButtons(d) {
for (var i = 0; i<butArray.length; i++) {
if (i != d) {
this[butArray
].enabled = 1;
this[butArray].gotoAndStop(1);
} else {
this[butArray
].enabled = 0;
this[butArray].gotoAndStop(2);
disButtons(0);
galleryChoice(0);
-------------------- signature -------------------
http://www.gregorywilker.com

can anyone help?
--------------------- signature -------------------
http://www.gregorywilker.com
"Greg Wilker" <[email protected]> wrote in message
news:g10146$nek$[email protected]..
> hello everyone,
>
>
>
> I am hoping I can help someone with a delivery deadline
of end of day
> today.
> This is handed off to me with the hope that I can, but I
am a new AS
> programmer, soooo...
>
>
>
> There is an image gallery that loads thumbs from an xml
file.
>
>
>
> The thumbs are links, each opening a larger version
while "whiting out"
> the
> center/thumb content.
>
>
>
> Clicking on the larger image closes it and the thumbs
reappear.
>
>
>
> BUGS
>
> 1. 1st thumb image isn't a link when swf loads
>
> 2. when a thumb is enlarged, it is no longer a link when
it is collapsed
> back to the thumbs
>
> 3. sometimes there are links to thumbs exposed when a
larger image is
> loaded
> a) result is that sometimes when collapsing a larger
image a new large
> image loads instead of collapsing to the thumbs

Similar Messages

  • BlueJ Help [Mainly File Operations, I think]

    I've been working on my Computers project for ages and have been breaking my head over it. It's 5AM and I'm still awake. Could somebody please please please help me with this code:
        public void Rates() throws IOException, IndexOutOfBoundsException
            double xrxClrRatesTemp2;
            double xrxBWRatesTemp2;
            int xrxLoop3;
            java.util.ArrayList<String> xrxClrRatesTemp1 = new java.util.ArrayList<String>();
            java.util.ArrayList<Double> xrxClrRatesTemp = new java.util.ArrayList<Double>();
            java.util.ArrayList<String> xrxBWRatesTemp1 = new java.util.ArrayList<String>();
            java.util.ArrayList<Double> xrxBWRatesTemp = new java.util.ArrayList<Double>();
            System.out.println("Xerox - Golden Bird Stores");
            System.out.println("What would you like to do?");
            Xerox:
            do
                xrxFlag = 0;
                xrxFlag1 = 0;
                xrxFlag2 = 0;
                xrxFlag3 = 0;
                FileWriter xrxClrFW = new FileWriter("Xerox Colour Rates.txt", true) ;
                FileReader xrxClrFR = new FileReader("Xerox Colour Rates.txt");
                BufferedReader xrxClrBR = new BufferedReader (xrxClrFR);
                FileWriter xrxBWFW = new FileWriter("Xerox BW Rates.txt", true) ;
                FileReader xrxBWFR = new FileReader("Xerox BW Rates.txt");
                BufferedReader xrxBWBR = new BufferedReader (xrxBWFR);
                String xrxClrText;
                String xrxBWText;
                while( (xrxClrText = xrxClrBR.readLine() ) != null )
                    xrxClrRatesTemp1.add(0, xrxClrText);
                    double xrxClrTempVal = Double.parseDouble(xrxClrRatesTemp1.get(0));
                    xrxClrRatesTemp.add(0, xrxClrTempVal);
                while( (xrxBWText = xrxBWBR.readLine() ) != null )
                    xrxBWRatesTemp1.add(0, xrxBWText);
                    double xrxBWTempVal = Double.parseDouble(xrxBWRatesTemp1.get(0));
                    xrxBWRatesTemp.add(0, xrxBWTempVal);
                if( (xrxClrRatesTemp.isEmpty() ) == true)
                    String xrxClrTempAdd = "0";
                    xrxClrRatesTemp1.add(0, xrxClrTempAdd);
                    double xrxClrTempAdd2 = Double.parseDouble(xrxClrRatesTemp1.get(0));
                    xrxClrRatesTemp.add(0, xrxClrTempAdd2);
                if( (xrxBWRatesTemp.isEmpty() ) == true)
                    String xrxBWTempAdd = "0";
                    xrxBWRatesTemp1.add(0, xrxBWTempAdd);
                    double xrxBWTempAdd2 = Double.parseDouble(xrxBWRatesTemp1.get(0));
                    xrxBWRatesTemp.add(0, xrxBWTempAdd2);
                BufferedWriter xrxClrBW = new BufferedWriter(xrxClrFW);
                PrintWriter xrxClrOutFile = new PrintWriter(xrxClrBW);
                BufferedWriter xrxBWBW = new BufferedWriter(xrxBWFW);
                PrintWriter xrxBWOutFile = new PrintWriter(xrxBWBW);
                Xerox1:
                do
                    xrxClrRatesTemp.ensureCapacity(1);
                    xrxBWRatesTemp.ensureCapacity(1);
                    InputStreamReader xrxRead = new InputStreamReader(System.in);
                    BufferedReader xrxBr = new BufferedReader(xrxRead);
                    System.out.println("1. Increase Xerox Rates");
                    System.out.println("2. Decrease Xerox Rates");
                    System.out.println("Type Exit if you wish to terminate.");
                    System.out.println();
                    System.out.println("Kindly enter a number to select a category.");
                    String xrxCheck = xrxBr.readLine();
                    if (xrxCheck.equalsIgnoreCase(xrxStr3))
                        break Xerox;
                    else if (xrxCheck.equals("1"))
                        XeroxInc:
                        do
                            xrxFlag1 = 1;
                            InputStreamReader xrxIncRead = new InputStreamReader(System.in);
                            BufferedReader xrxIncBr = new BufferedReader(xrxIncRead);
                            System.out.println();
                            System.out.println("1. Increase Colour Xerox Rates.");
                            System.out.println("2. Increase B/W Xerox Rates.");
                            String xrxIncCheck = xrxIncBr.readLine();
                            if (xrxIncCheck.equals("1"))
                                xrxFlag2 = 1;
                                XeroxClr1:
                                do
                                    InputStreamReader xrxClrRead1 = new InputStreamReader(System.in);
                                    BufferedReader xrxClrBr1 = new BufferedReader(xrxClrRead1);
                                    System.out.println();
                                    System.out.println("How much would you like to increase the rates by?");
                                    System.out.println("The current rate is: Rs. " + xrxClrRatesTemp.get(0) + " per side.");
                                    String xrxClrCheck1 = xrxClrBr1.readLine();
                                    double xrxClrCheck2;
                                    char xrxClrCheckA = xrxClrCheck1.charAt(0);
                                    if (xrxClrCheck1.equalsIgnoreCase(xrxStr3))
                                        break Xerox1;
                                    else if ( (xrxClrCheckA >= 'a' && xrxClrCheckA <= 'z') || (xrxClrCheckA >= 'A' && xrxClrCheckA <='Z') || ( (xrxClrCheckA  >= '0' && xrxClrCheckA <= '9') == false ) )
                                        System.out.println("That is not an acceptable value. Please try again.");
                                        continue XeroxClr1;
                                    else if ( (xrxClrCheck2 = Double.parseDouble(xrxClrCheck1) ) >= 0)
                                        xrxFlag3 = 1;
                                        xrxClrCheck2 = Double.parseDouble(xrxClrCheck1);
                                        System.out.println();
                                        xrxClrRatesTemp2 = xrxClrRatesTemp.get(0);
                                        xrxClrRatesTemp2 = xrxClrRatesTemp2 + xrxClrCheck2;
                                        xrxClrRatesTemp.set(0, xrxClrRatesTemp2);
                                        System.out.println("The rate has been increased by Rs. " + xrxClrCheck2 + " per side.");
                                while(xrxFlag3 == 0);
                            else if (xrxIncCheck.equals("2"))
                                xrxFlag2 = 1;
                                XeroxBW1:
                                do
                                    InputStreamReader xrxBWRead1 = new InputStreamReader(System.in);
                                    BufferedReader xrxBWBr1 = new BufferedReader(xrxBWRead1);
                                    System.out.println();
                                    System.out.println("How much would you like to increase the rates by?");
                                    System.out.println("The current rate is: Rs. " + xrxBWRatesTemp.get(0) + " per side.");
                                    String xrxBWCheck1 = xrxBWBr1.readLine();
                                    double xrxBWCheck2;
                                    char xrxBWCheckA = xrxBWCheck1.charAt(0);
                                    if (xrxBWCheck1.equalsIgnoreCase(xrxStr3))
                                        break Xerox1;
                                    else if ( (xrxBWCheckA >= 'a' && xrxBWCheckA <= 'z') || (xrxBWCheckA >= 'A' && xrxBWCheckA <='Z') || ( (xrxBWCheckA  >= '0' && xrxBWCheckA <= '9') == false ) )
                                        System.out.println("That is not an acceptable value. Please try again.");
                                        continue XeroxBW1;
                                    else if ( (xrxBWCheck2 = Double.parseDouble(xrxBWCheck1) ) >= 0)
                                        xrxFlag3 = 1;
                                        xrxBWCheck2 = Double.parseDouble(xrxBWCheck1);
                                        System.out.println();
                                        xrxBWRatesTemp2 = xrxBWRatesTemp.get(0);
                                        xrxBWRatesTemp2 = xrxBWRatesTemp2 + xrxBWCheck2;
                                        xrxBWRatesTemp.set(0, xrxBWRatesTemp2);
                                        System.out.println("The rate has been increased by Rs. " + xrxBWCheck2 + " per side.");
                                while(xrxFlag3 == 0);
                            else
                                System.out.println("An incorrect command was entered. Please try again.");
                                System.out.println();
                                continue XeroxInc;
                        while(xrxFlag2 == 0);
                    else if (xrxCheck.equals("2"))
                        XeroxDec:
                        do
                            xrxFlag1 = 1;
                            InputStreamReader xrxDecRead = new InputStreamReader(System.in);
                            BufferedReader xrxDecBr = new BufferedReader(xrxDecRead);
                            System.out.println();
                            System.out.println("1. Decrease Colour Xerox Rates.");
                            System.out.println("2. Decrease B/W Xerox Rates.");
                            String xrxDecCheck = xrxDecBr.readLine();
                            if (xrxDecCheck.equals("1"))
                                xrxFlag2 = 1;
                                XeroxClr2:
                                do
                                    InputStreamReader xrxClrRead2 = new InputStreamReader(System.in);
                                    BufferedReader xrxClrBr2 = new BufferedReader(xrxClrRead2);
                                    System.out.println();
                                    System.out.println("How much would you like to decrease the rates by?");
                                    System.out.println("The current rate is: Rs. " + xrxClrRatesTemp.get(0) + " per side.");
                                    String xrxClrCheck3 = xrxClrBr2.readLine();
                                    double xrxClrCheck4;
                                    char xrxClrCheckB = xrxClrCheck3.charAt(0);
                                    if (xrxClrCheck3.equalsIgnoreCase(xrxStr3))
                                        break Xerox1;
                                    else if ( (xrxClrCheckB >= 'a' && xrxClrCheckB <= 'z') || (xrxClrCheckB >= 'A' && xrxClrCheckB <='Z') || ( (xrxClrCheckB  >= '0' && xrxClrCheckB <= '9') == false) )
                                        System.out.println("That is not an acceptable value. Please try again.");
                                        continue XeroxClr2;
                                    else if ( (xrxClrCheck4 = Double.parseDouble(xrxClrCheck3) ) >= 0)
                                        xrxFlag3 = 1;
                                        xrxClrCheck4 = Double.parseDouble(xrxClrCheck3);
                                        System.out.println();
                                        xrxClrRatesTemp2 = xrxClrRatesTemp.get(0);
                                        xrxClrRatesTemp2 = xrxClrRatesTemp2 - xrxClrCheck4;
                                        xrxClrRatesTemp.set(0, xrxClrRatesTemp2);
                                        System.out.println("The rate has been decreased by Rs. " + xrxClrCheck4 + " per side.");
                                while(xrxFlag3 == 0);
                            else if (xrxDecCheck.equals("2"))
                                xrxFlag2 = 1;
                                XeroxBW2:
                                do
                                    InputStreamReader xrxBWRead2 = new InputStreamReader(System.in);
                                    BufferedReader xrxBWBr2 = new BufferedReader(xrxBWRead2);
                                    System.out.println();
                                    System.out.println("How much would you like to decrease the rates by?");
                                    System.out.println("The current rate is: Rs. " + xrxBWRatesTemp.get(0) + " per side.");
                                    String xrxBWCheck3 = xrxBWBr2.readLine();
                                    double xrxBWCheck4;
                                    char xrxBWCheckB = xrxBWCheck3.charAt(0);
                                    if (xrxBWCheck3.equalsIgnoreCase(xrxStr3))
                                        break Xerox1;
                                    else if ( (xrxBWCheckB >= 'a' && xrxBWCheckB <= 'z') || (xrxBWCheckB >= 'A' && xrxBWCheckB <='Z') || ( (xrxBWCheckB  >= '0' && xrxBWCheckB <= '9') == false ) )
                                        System.out.println("That is not an acceptable value. Please try again.");
                                        continue XeroxBW2;
                                    else if ( (xrxBWCheck4 = Double.parseDouble(xrxBWCheck3) ) >= 0)
                                        xrxFlag3 = 1;
                                        xrxBWCheck4 = Double.parseDouble(xrxBWCheck3);
                                        System.out.println();
                                        xrxBWRatesTemp2 = xrxBWRatesTemp.get(0);
                                        xrxBWRatesTemp2 = xrxBWRatesTemp2 - xrxBWCheck4;
                                        xrxBWRatesTemp.set(0, xrxBWRatesTemp2);
                                        System.out.println("The rate has been decreased by Rs. " + xrxBWCheck4 + " per side.");
                                while(xrxFlag3 == 0);
                            else
                                System.out.println("An incorrect command was entered. Please try again.");
                                System.out.println();
                                continue XeroxDec;
                        while(xrxFlag2 == 0);
                    else
                        xrxFlag1 = 0;
                        System.out.println("An incorrect command was entered. Please try again.");
                        System.out.println();
                        continue Xerox1;
                while(xrxFlag1 == 0);
                InputStreamReader xrxRead2 = new InputStreamReader(System.in);
                BufferedReader xrxBr2 = new BufferedReader(xrxRead2);
                System.out.println();
                System.out.println("Type Yes if you wish to enter another command. Type No if you wish to exit.");
                xrxRepeat = xrxBr2.readLine();
                Xerox2:
                do
                    if (xrxRepeat.equalsIgnoreCase(xrxStr2))
                        System.out.println();
                        System.out.println("Have a nice day!");
                        System.out.println();
                        xrxFlag = 1;
                        for (xrxLoop3 = 0; xrxLoop3 <= 1; xrxLoop3++)
                            int xrxClrSize = xrxClrRatesTemp.size();
                            int xrxBWSize = xrxBWRatesTemp.size();
                            if (xrxLoop3 == 0 && xrxClrSize == 1 && xrxBWSize == 1)
                                xrxClrOutFile.println(xrxClrRatesTemp.get(0));
                                xrxBWOutFile.println(xrxBWRatesTemp.get(0));
                            else if (xrxLoop3 == 1 && xrxClrSize == 1 && xrxBWSize == 1)
                                xrxClrOutFile.println(xrxClrRatesTemp.get(0));
                                xrxBWOutFile.println(xrxBWRatesTemp.get(0));
                        xrxClrOutFile.close();
                        xrxClrBW.close();
                        xrxClrFW.close();
                        xrxClrBR.close();
                        xrxBWOutFile.close();
                        xrxBWBW.close();
                        xrxBWFW.close();
                        xrxBWBR.close();
                        break Xerox;
                    else if (xrxRepeat.equalsIgnoreCase(xrxStr1))
                        System.out.println();
                        System.out.println("Here are the categories again:");
                        xrxFlag = 2;
                        for (xrxLoop3 = 0; xrxLoop3 <= 1; xrxLoop3++)
                            int xrxClrSize = xrxClrRatesTemp.size();
                            int xrxBWSize = xrxBWRatesTemp.size();
                            if (xrxLoop3 == 0 && xrxClrSize == 1 && xrxBWSize == 1)
                                xrxClrOutFile.println(xrxClrRatesTemp.get(0));
                                xrxBWOutFile.println(xrxBWRatesTemp.get(0));
                            else if (xrxLoop3 == 1 && xrxClrSize == 1 && xrxBWSize == 1)
                                xrxClrOutFile.println(xrxClrRatesTemp.get(0));
                                xrxBWOutFile.println(xrxBWRatesTemp.get(0));
                    else
                        System.out.println();
                        System.out.println("An incorrect command was entered.");
                        System.out.println();
                        System.out.println("Type Yes if you wish to enter another command. Type No if you wish to exit.");
                        xrxFlag = 0;
                        xrxRepeat = xrxBr2.readLine();
                while (xrxFlag == 0);
            while (xrxRepeat.equalsIgnoreCase(xrxStr1));
        }   My primary concern is that the text file always becomes empty or has the value 0.0 when it isn't supposed to.
    Clr = Colour
    BW = Black and White
    Please guys, I really need help. I'm very sleepy at the moment.

    You may get some help here, but many will think that this is a bit too much code to ask any volunteer to go through. For our benefit, and for your benefit, refactor your program so that it will be easier for you and us to figure out. Also, you may wish to leave off on the theatrics as that often turns folks here off and doesn't induce folks to help. You're better off typing in more useful information such as what you've tried and the results of these efforts. But again, I've looked at your code again and it is a single huge method, so I'm not surprised that you're having problems with it. Breaking it down to constituent parts will only help you.
    Best of luck.
    Edited by: Encephalopathic on Jul 12, 2008 5:49 PM

  • Help!  I don't think my files backed up and system crashed!

    Help!  I don't think my files backed up and when I restart computer it only comes up with osx utilities but won't  let me reinstall or do anything.  Is there anything I can do?  I didn't set up time machine because my external hard drive was full!

    Did you run Verify and Repair in Disk Utility?  It will correct possible disk problems or indicate that the HDD is faulty.
    Ciao.
    Until you do that, a reinstallation may be pointless.
    Message was edited by: OGELTHORPE

  • Dv 9640 screen won't close ! can't fold it ! (emergency help)

    hay guys,
    my laptop screen won't close. I can't fold my laptop. i have to let my laptop open for all time. it;s terrible. i can't even chat with one of the hp technician. it keeps giving me error. I'm stuck. I have no idea how to repair it. 
    If you guys can help me .. there are some photos that can help you understand what's happening here ! 
    it's hinge problem - outer case or inter case is the problem - i think
    thanks - any advice will be helpfull. (sorry for bad english
    thanks guys, it's kinda emergency for me !
    Message Edited by Megh on 07-04-2009 07:25 AM
    Message Edited by Megh on 07-04-2009 07:26 AM

    half an hour later i found at the problem and fixed (temporarely) the problem.
    one of the hinges is not working anymore, just like a car ball hinge. 
    to fix it:
    1. unscrew the screen cover and then detach it from the screen (the screws are covered by some plastic or rubber protection)
    2. unscrew the hinge and then pull it sideways until it breaks loose. I used some force, but tried to be careful. (picture 2 and three)
    3. put the cover back on the screen.
    4. either try to get a replacement hinge (the part number can be seen only partlally) or use the screen only with one hinge, which I did. When closing it or adjusting it, just be carefull to hold with the hand the side without a hinge. When fixed it stays there as before.

  • Need help with Logic Error(I think?)

    Hello. The following is a program I am creating to calculate the start value of a gymnastics routine, the basics are as follows(And not everything is implemented yet):
    In gymnastics there are the aparatuses, then skill group codes, then "skills" a-g or something like that(My brother is the gymnast, i'm the programmer). Basically as of right now im testing the logic of actually adding up the values based on which option they choose, since the options are strings, i set the strings into an array and then i have a score value array(Values are random at this point).
    The problem is, the totalvalue(i think its called that) number is not showing up. There is something wrong in the way i order the things.
    This compiles PERFECTLY and runs, and everything is right except the showing up of a number which should show when you choose options in the combo boxes.
    Here is the code, help please :)!!!
    Main:
    //GymnasticsMain.java
    //The Main top program - calls the panels.
    //By: Ian Coolidge
    //June 5, 2007
    import javax.swing.*;
    public class GymnasticsMain
         //Calls all the panels, they can be found under their names
         public static void main (String[] args)
          JFrame frame = new JFrame ("Gymnastics Super Program");
          frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
          GymnasticsControls controlPanel = new GymnasticsControls();
          frame.getContentPane().add(controlPanel);
          frame.pack();
          frame.setVisible(true);
    }The Guts of the program:
    //GymnasticsCrontrols.java
    //This creates the actual guts of the program, you know, the buttons and menus and the such
    //By: Ian Coolidge
    //June 5, 2007
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.net.URL;
    import java.lang.*;
    public class GymnasticsControls extends JPanel
         private JComboBox GymApparatus;
         private JComboBox GymGroupCode;
         private JLabel label;
         private JLabel scoreLabel;
         private double currentApparatus;
         private double currentCode;
         private String ScoreLine;
         private double TotalValue;
         private double[] score = new double[20];
         public GymnasticsControls()
         score[0] = 1.2;
         score[1] = 1.4;
         score[2] = 0.5;
         score[3] = 0.2;
         score[4] = 2.2;
         score[5] = 0.7;
         score[6] = 0.2;
         score[7] = 0.2;
         score[8] = 6.2;
         score[9] = 3.2;
         score[10] = 2.2;
         score[11] = 0.76;
         score[12] = 0.378;
         score[13] = 0.87;
         score[14] = 0.19784;
         score[15] = 0.1278;
         score[16] = 0.2834;
         score[17] = 0.3534;
         score[18] = 0.323;
         score[19] = 0.45;
              ScoreLine = "Your starting value is: "+TotalValue;
              scoreLabel = new JLabel(ScoreLine);
              //The following is the declaration of the list of options in the drop down menus
              String[] Apparatus = {"Apparatus", "Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar"};
              GymApparatus = new JComboBox (Apparatus);
              GymApparatus.setAlignmentX (Component.LEFT_ALIGNMENT);
              String[] GroupCode = {"Group Code", "I", "II", "III", "IV", "V"};
              GymGroupCode = new JComboBox (GroupCode);
              GymGroupCode.setAlignmentX (Component.LEFT_ALIGNMENT);
              //Sets up the panel
              add (scoreLabel);
              setPreferredSize (new Dimension (300, 100));
              setBackground (Color.cyan);
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymApparatus);
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymGroupCode);
              add (Box.createRigidArea (new Dimension(0,5)));
              GymApparatus.addActionListener (new ComboListener());
              GymGroupCode.addActionListener (new ComboListener());
              TotalValue = currentApparatus + currentCode;
              private class ComboListener implements ActionListener
                   public void actionPerformed (ActionEvent event)
                        //Should assign a number based on the number string to whatever is chosen in the drop down menu
                        currentApparatus = score[GymApparatus.getSelectedIndex()];
                        currentCode = score[GymGroupCode.getSelectedIndex()];
    }I tried moving stuff all around, and it still doesn't work. Thanks very much for all the help!
    -Ian

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.net.URL;
    import java.lang.*;
    public class GymnasticsControls extends JPanel
         private JComboBox GymApparatus;
         private JComboBox GymGroupCode;
         private JLabel label;
         private JLabel scoreLabel;
         private double currentApparatus;
         private double currentCode;
         private String ScoreLine;
         private double TotalValue;
         private double[] score = new double[20];
         public GymnasticsControls()
         score[0] = 1.2;
         score[1] = 1.4;
         score[2] = 0.5;
         score[3] = 0.2;
         score[4] = 2.2;
         score[5] = 0.7;
         score[6] = 0.2;
         score[7] = 0.2;
         score[8] = 6.2;
         score[9] = 3.2;
         score[10] = 2.2;
         score[11] = 0.76;
         score[12] = 0.378;
         score[13] = 0.87;
         score[14] = 0.19784;
         score[15] = 0.1278;
         score[16] = 0.2834;
         score[17] = 0.3534;
         score[18] = 0.323;
         score[19] = 0.45;
              ScoreLine = "Your starting value is: "+TotalValue;
              scoreLabel = new JLabel(ScoreLine);
              //The following is the declaration of the list of options in the drop down menus
              String[] Apparatus = {"Apparatus", "Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar"};
              GymApparatus = new JComboBox (Apparatus);
              GymApparatus.setAlignmentX (Component.LEFT_ALIGNMENT);
              String[] GroupCode = {"Group Code", "I", "II", "III", "IV", "V"};
              GymGroupCode = new JComboBox (GroupCode);
              GymGroupCode.setAlignmentX (Component.LEFT_ALIGNMENT);
              //Sets up the panel
              add (scoreLabel);
              setPreferredSize (new Dimension (300, 100));
              setBackground (Color.cyan);
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymApparatus);
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymGroupCode);
              add (Box.createRigidArea (new Dimension(0,5)));
              GymApparatus.addItemListener(new ComboListener());
              GymGroupCode.addItemListener(new ComboListener());
              TotalValue = currentApparatus + currentCode;
              private class ComboListener implements ItemListener
                   public void itemStateChanged(ItemEvent event)
                        //Should assign a number based on the number string to whatever is chosen in the drop down menu
                        currentApparatus = score[GymApparatus.getSelectedIndex()];
                        currentCode = score[GymGroupCode.getSelectedIndex()];
                        TotalValue = currentApparatus ;
                        scoreLabel.setText("Your starting value is: " + TotalValue);
    }Check the above modified code. Its an example. ItemListener added instead of ActionListener

  • My home button is not working. I have turned it off and on and have tried restarting it but it still wont work. Please help me? do you think there might be something wrong with the button?

    Hello. So i Have tried to be using my Home Button, but everytime i seem to push it it wont go back to the home screen or quit an application. I havetried restarting ym Ipod and turning off and on but it doesnt seen to work. I think it might be the actal button that is sbroken or something. Does someone mind helping me out what wrong?? please?? Thank you!!!!!

    Try this:
    Calibrate Home Button
    1. Open a stock application like Calendar, Weather or Youtube
    2. Hold down the power button until the "slide to power off" control appears
    3. As soon as you see it, press the Home button and keep it pressed until the red slider disappears and the app is forced quit to the Home menu

  • Help: CS3 Design Premium suddenly stopped working, won't reinstall

    I have a licensed copy of Adobe CS3 Design Premium for Windows (on a machine w/Vista), and everything was working fine until this past weekend, when I was suddenly unable to access any of the programs (with the exception of Acrobat).  Every time I tried to open one of the CS3 applications, I'd get an error message saying that there was a problem with the program, and I would have to uninstall and reinstall.  So, I uninstalled the entire suite, but every time I try to reinstall, at the end of the process I get an uninformative message stating that "Some problems occurred during installation", and a message under each of the components stating "Component install failed".
    Nothing on my computer has changed recently -- I haven't added any software, hardware, or otherwise done anything unusual that might cause this problem.  I use this software on a daily basis, so it's become quite a problem for me.
    Does anyone know how to fix this issue?  I've tried uninstalling and reinstalling multiple times, always with the same result.
    Any help would be appreciated.

    nfietz wrote:
    …When I upload the photos to my computer I've previously run them through the DNG converter without a problem…
    Had you run the DNG on a Mac before?  On the Mac, the DNG Converter works on folders only, not on individual files (unless you use the Finder to drop the icons of your raw files on the DNG Converter application icon).  From within the application, using File > Open, the icon and names of individual raw files will always appear grayed out.
    You need to target the folder that contains the files you want to convert.
    CAVEAT: all eligible files in the folder will be converted, including any and all DNG files that may already be contained in the folder.  So if you have any DNGs in that folder, they will also be converted again and the original DNGs may be overwritten.
    Wo Tai Lao Le
    我太老了
    Message was edited by: Tai Lao

  • Please help, CS3 won't run with 10.5.2!  Please!

    Installed 10.5.2 on my g5 dual 2.5 w 4.5 gigs ram (NOT) intel. Now my AE projects won't run. One started to and then quit. This is major for me. Involves dozens of projects. Please help.

    Yes, my powerbook is also trouble-free.
    But it's just too slow to run AE on.
    And yes, yes, I did repair permissions. I did everything including a "safe" starup, repair permissions many many times, etc. etc. etc.
    I'm beginning to think the problem with AE was with non-ae plugins. But then why did automator and software update cease to work?????

  • Need EMERGENCY Help... some photos are solid green

    Been working on 8 different tribute videos all week... now exporting for showing at a banquet tonight and the problem is that some of the photos are appearing as green blocks. There is no consistency with file type, as some are jpegs and some are .psd. I have been doing these videos for 8 years and never had this probelm. I have tried exporting as MPEG-2, AVI and H.264. Same problem each time. Photos show up fine in PPro timeline. HELP!!!!

    If the images 'Preview Render' fine in the timeline, and it's an emergency,
    you could try exporting with 'Use Previews' checked.
    You will likely take a degree of quality hit, but if it's an emergency.....

  • I need help contacting someone that can help me find who the previous owner was who set up my iphone 5s, there is an activation lock and i need to contact the owners. help??? i think the iphone was stolen and then sold to me

    i think my iphone was stolen before being sold to me, i need help finding out who the original owner was to unlock the phone. any ideas on numbers i could ring? im super gutted

    If you are trying to activate an iPad or iPhone and it is asking for a previous owners Apple ID and password, you have encountered the Activation Lock. This is a security feature that prevents thieves from setting up and using a stolen or lost iPad or iPhone. You have no alternative. You must contact the previous owner to get permission to use the device. If you cannot contact the previous owner return the device to where you bought it and get a refund. You will never be able to activate the device and no one can help you do it.

  • Help!!! I think my computer is broken??

    I posted this in the powerbook section, but I am desperate for an answer, so I will post it here too, since it looks like there is more activity here
    I registered here to ask this question, so I am not sure if I am posting it in the right spot ... but here goes ... and I am very UN tech savvy, so please, if you have any info for me, could you try to make it as easy to understand as possible ...
    I don't know what I installed, or what I deleted, but I was playing around trying to install a program to convert .avi's to .mov's, and my computer got majorly screwed (I think) ... btw, its a 3 year old powerbook that I am using, with an older version of OSX... I can't be sure of which version though ... also, the 80 gig hard drive is almost completely full ... I was downloading some stuff and there was barely any room left on it ... idk if that matters or not
    Well anyway, my computer started acting a little strange, programs freezing and not starting, so I restarted the computer. When it got back to the desktop screen, the icon bar on the bottom of the screen was the only thing that showed up. None of my desktop icons or the bar on the top of the screen is displayed now, and any of the programs I try to run from the bottom bar wont start ... and thats pretty much the problem... I have no clue what to do now ...
    I tried to run the operating system Install/Restore disk, but when I turn on the computer and hold the C key as instructed by the label on the disk, it gets to the gray screen with the apple logo but then the logo shifts just a couple millimeters to the right and some lines or dots appear to the left of it, and that screen just stays there ... so I am assuming the computer is just frozen at that point ...
    So ... thats where I am ... I don't know what to do know ... If anyone can help me, please do so ... I could really use some instruction ...

    its not that simple ... the bar thats on the top of the screen, ... well its not there anymore ... all that loads is the dock ... and any programs on it wont load
    now I have an even worse program ... when I got back from work, I tried it again, and now it wont even sit at the desktop, it will stay there for a moment with just the dock showing, then the screen turns to blue for a couple seconds, and then goes back to the desktop ... this keeps doing this over and over again ...
    If I could somehow access any data on the hard drive and delete it, that would be the first thing I would do ... but I just cant do anything with the **** thing ... the system restore disk even crashes the computer when I try to boot from the cd ... I am really stuck here ...

  • Using JSX to create a folder Help [CS3].

    I'm trying to automate the zoomify export feature in photoshop CS3. It works fine until I try and save the file to a directory that does not exist. Instead of creating the directory, it throws an error and quits the script. So what I want to do is create a directory before I run the code to make the zoomify but I can't find a way to do so in google. Any help would be nice! Here is the code I was using.
    var id12 = charIDToTypeID( "Expr" );
        var desc5 = new ActionDescriptor();
        var id13 = charIDToTypeID( "Usng" );
            var desc6 = new ActionDescriptor();
            var id14 = stringIDToTypeID( "template" );
            desc6.putPath( id14, new File( "C:\\Program Files\\Adobe\\Adobe Photoshop CS3\\Presets\\Zoomify\\Zoomify Viewer (Black Background).zvt" ) );
            var id15 = charIDToTypeID( "Otpt" );
            desc6.putPath( id15, new File( "P:\\upLoad\\item_zoom\\"+name1+"-"+name2 ) ); // This is where the error is hitting, where name1+"-"+name2 needs to be created.
            var id16 = stringIDToTypeID( "baseName" );
            desc6.putString( id16, imageZoom );
            var id17 = charIDToTypeID( "EQlt" );
            desc6.putInteger( id17, 8 );
            var id18 = charIDToTypeID( "Optm" );
            desc6.putBoolean( id18, true );
            var id19 = stringIDToTypeID( "browserWidth" );
            desc6.putInteger( id19, 540 );
            var id20 = stringIDToTypeID( "browserHeight" );
            desc6.putInteger( id20, 490 );
            var id21 = charIDToTypeID( "Prvw" );
            desc6.putBoolean( id21, true );
        var id22 = stringIDToTypeID( "Zoomify" );
        desc5.putObject( id13, id22, desc6 );
    executeAction( id12, desc5, DialogModes.NO );

    You can create the folder like this
    var myFolder = new Folder('/p/upload/item_zoom');
    if(!myFolder.exists) myFolder.create();
    You just have to make sure that the parent folder exists as well, in this case '/p/upload'. If not you need to create that folder first then the subfolder.
    You might also run into privilage issues with some OS.

  • HELLLLLLLLLLLLLLLLLLP! Emergency HELP!!!!!

    Okay, one of my kids stuck a plastice NON-CD in my drive...you know...the one at the top of the spindle...So I carefully removed my keyboard...took out the drive and remove the CD.
    Closed everything up, now my computer won't power up. I know I know...I'm a dork, but I'm also a broke dork and didn't have the funds to pay 100 clams to have it removed...should have...but didn't.
    anyway...there is a thing hanging down from the keyboard...should that be connected to something? It didn't seem like it was when I took it off...but who knows...i'm definately not a tech guy ...all you tech gods out there...please help!
    Does anyone know if there is an online video I can watch for keyboard removal/reconnection...I couldn't find one, but it might do the trick.
    I've got film festival I have to get my stuff off to tomorrow.
    Thanks
    IX

    In the future don't leave your computer near that kid. They may damage it further without meaning to. Kids who don't know that machines have fragile parts, or think that certain things work certain ways when they don't really can cause a lot of damage to computers.
    I've read plenty of horror stories where Kool Aid has damaged a computer keyboard, and the infamous one where a tray loading optical drive was used as a cup holder, and worse, paper clips in the optical drive. For people who don't know how to use the computer, teach them first before they are allowed near it.

  • Everytime I open FFox I find over 400 cookies on my machine despite clearing history, deleting them etc - please help me eliminate them I think they are killing my computer!

    Thank you for the opportunity to submit this query and hurray for the volunteers who will tackle it! Thank you!
    on opening FFox, I routinely run Tools/View Cookies and clear my Error Console. I INVARIABLY find over 400 cookie directories arranged in two "lists". I clear them with Delete All Cookies and carry on.
    I have tried limiting cookie access (ie: no 3rd party), and I have cleared my History including Cookies, BUT everytime I open FFox, they are all back!
    I have even installed a Mozilla Cookie Killer plug-in, but though it may work, the little buggers are back the very next time I open FFox.
    I believe their presence is seriously degrading my old but much loved Dell Inspiron 6400's performance and I would dearly love to be able to remove them permanently.
    If you could help I would be very grateful.
    Cheers and best wishes,
    Patrick
    Launceston Tasmania Australia

    That's going to be a ridiculous waste of money and energy.
    First of all, the current ATI drivers don't support multiple GPUs, so at the moment even a single 4870X2 would be only a 'normal' 4870 (which is quite a speed beast already). GFX drivers evolve rapidly, so things might look different next month, but when it comes to Linux and hardware there's one Golden Rule: stay away from the newest stuff and wait for proper support to get coded.
    I also wonder what power supply could possibly cope with the differences between idle and full load; that's way beyond 400W. But then, I'm one of those "quiet&green" types where >100W idle is already a bit much.
    I kind of understand that you want to get it done and not worry about hardware for the next 10 years or so, but that's simply not how the hardware world works and never did. At least not for the average consumer.

  • Help CS3 isn't working correctly in my new computer

    I just bought a new computer...I had no choice..the other one was dying. I do basic photo editing, but I do it daily.
    I have loaded my CS 3 onto my new Asus, with Windows 7 and i5 processor. Before I bought I did a lot of asking of friends and computer shops...all said CS3 would work just fine with this set up. I have it installed.....BUT I do alot if editing in camera raw with my jpegs. So far when I was setting up brideg, the computer pops us telling me that it won't work well with my processor. The whole reason I got the i5 was because I was told it would work best with it. It was a huge deciding factor for buying the computer. When I open the files in camera raw, it wil llet me edit, but won't  save anything..I'm assuming because it doesn't like the i5 processor. it tells me it' unable to save conversion, access denied.  Is there anything I can do. I really DON'T want to upgrade. I just spent a lot on a computer I was told would work with CS3 by several people and I am not good with change. I like CS3, it works for what I need and I prefer not to have to learn anything new, even if thechanges are minor.
    Does anyone have any suggestions?

    Hi Jenseib
    I'm no expert on the technical in's and out's of Photoshop - hopefully someone more knowledgeable than myself will chime-in soon - but this might be a Win7 issue; is your User Profile set-up as an "Administrator?"
    As for your CS3, a word of warning. As of CS6, which should be released in April, Adobe will only allow us to upgrade from One Full Version back, as opposed to the three versions we are currently allowed.
    What that means to you is that when CS6 is released, if you are NOT on CS5, you will NOT be able to upgrade to 6 or any further releases, you will have to buy a new full copy, which will be very expensive; a new copy of Photoshop CS5 is roughly $700!
    Good luck
    Paul

Maybe you are looking for

  • How do you get the email address on a 755P to show-up as something other than your phone number?

    I have a 755p and as far as I know, it is set-up properly, however, everytime I send or respond to an email from my 755P, the"sender" email address shows-up as my phone number with my email address in <>.  I would like to simply have my actual email

  • Blocks in ALV side by side

    Hi Experts, I have a requirement that is of output with 3 Blocks of ALV side by side. How can I do this. Can anybody help me in this regard. Thanks, bsv.

  • Config profile for AppleTV

    Hi all, I have a dozen or so Apple TV's I'm rolling out for our school, and they need configuring with a profile to attach them to our wifi network. I've run into a wall though - I need to give the profile a certificate, but I can't figure out how to

  • Downloading and installing itunes

    when ive tried to download and install itunes it downloads ok but when i try to install itunes i get this pop-up saying "this installation package could not be opened. Verify that the package exists and that you can access it or contact the applicati

  • Info spoke and Info hub

    Hi, What is an infospoke and infohub? How they are related to each other? Is there any benefits for using the Infospoke and Infohub?. Please update me on this. Thanks and Regards Satish