Hi changed the folowing code:

            //creates the numbered buttons
           //newButt = attachMovie("butt", "butt"+i, 9999999+i);
           //newButt._x = 210+(newButt._width)*pub_count;
           //newButt._y = 370;
           //newButt.txt.text = [pub_count];
           cliente = mainFotos[i].childNodes[2].attributes.cliente;
           linha = mainFotos[i].childNodes[2].attributes.projecto;
           ano = mainFotos[i].childNodes[2].attributes.ano;
           link = mainFotos[i].childNodes[0].firstChild.nodeValue;
           //newButt.link2 =
mainFotos[i].childNodes[1].firstChild.nodeValue;

           testeButton.onRelease = function() {

               mc_loading._visible = true;
               work_mc._y = 428;
               imagem_mc._y = -365;
               imagemp_mc._x = 704;

               // load the clip
               myMCL.loadClip(link, imagem_mc);
               work_mc.cli_txt.text = cliente;
               work_mc.lin_txt.text = linha;
               work_mc.ano_txt.text = ano;
               folioAppearY(work_mc, (i+3), 235);
           };
           pub_count++;
       }
   }
}

The problem is that when i click the button he goes to the last node...how
can i make it stop at each value and then when i press it..goes to the new
one?

im still trying..a help would be great..

José Maria


On 6/11/07, José Maria Barros <[EMAIL PROTECTED]> wrote:

Hi..ive been doing a photo menu in xml.

Basically i create text buttons for each node that loads a new photo with
new information.

What i want is to take out the numbers and substitute for two buttons
only, one "next" and one "previous" button.

I cant for now program that everytime i press the button i cant make them
go one node ahead..(load the new image and the new information)..
Here is the function :


function createfotoMenu():Void {
    pub_count = 1;
    other_count = 0;


    for (i=0; i<mainFotos.length; i++) {
        var cliente:String =
mainFotos[i].childNodes[2].attributes.cliente;
        var servico:String =
mainFotos[i].childNodes[2].attributes.servico;
        if (cliente == "Intermarché" && servico == "Packaging") {
            first_valueNod =
mainFotos[i].childNodes[0].firstChild.nodeValue;
            first_valueCliente =
mainFotos[i].childNodes[2].attributes.cliente;
            first_valueLinha =
mainFotos[i].childNodes[2].attributes.projecto;
            first_valueAno = mainFotos[i].childNodes[2].attributes.ano;
            if (other_count == 0) {
                curr_valueNod = first_valueNod;
                curr_valueCliente = first_valueCliente;
                curr_valueLinha = first_valueLinha;
                curr_valueAno = first_valueAno;
                other_count++;
            }

            //load the first client photo and information
            work_mc._y = 428;
            imagem_mc._y = -365;
            myMCL.loadClip(curr_valueNod, imagem_mc);
            work_mc.cli_txt.text = curr_valueCliente;
            work_mc.lin_txt.text = curr_valueLinha;
            work_mc.ano_txt.text = curr_valueAno;
            folioAppearY(work_mc, (i+3), 235);


            //creates the numbered buttons
            newButt = attachMovie("butt", "butt"+i, 9999999+i);
            newButt._x = 210+(newButt._width)*pub_count;
            newButt._y = 370;
            newButt.txt.text = [pub_count];
            newButt.cliente =
mainFotos[i].childNodes[2].attributes.cliente;
            newButt.linha =
mainFotos[i].childNodes[2].attributes.projecto;
            newButt.ano = mainFotos[i].childNodes[2].attributes.ano;
            newButt.link =
mainFotos[i].childNodes[0].firstChild.nodeValue;
            newButt.link2 =
mainFotos[i].childNodes[1].firstChild.nodeValue;


            //loads the information for each movie
            newButt.onRelease = function() {
                mc_loading._visible = true;
                work_mc._y = 428;
                imagem_mc._y = -365;
                imagemp_mc._x = 704;

                // load the clip
                myMCL.loadClip(this.link, imagem_mc);
                work_mc.cli_txt.text = this.cliente;
                work_mc.lin_txt.text = this.linha;
                work_mc.ano_txt.text = this.ano;
                folioAppearY(work_mc, (i+3), 235);
            };
            pub_count++;
        }
    }
}



Can anyone give me a tip? Thanks in advance..

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to