7 Replies Latest reply on Jun 20, 2006 8:02 AM by pandemicxor

    Very simple request for help!

    pandemicxor Level 1
      Ok, so in this file, http://impulse100.net/navflash.fla

      There are nine buttons.

      I just want each button to point to:

      index.php, news.php, account.php, forums.php, submit.php, login.php, rss.php, contact.php, register.php

      for some reason when I put the following code on the buttons, then I click them, it just will not work. it makes me sad.

        • 1. Re: Very simple request for help!
          first make sure that that code is on the MAIN timeline.

          then write:

          button1.onRelease= function() {

          and so on... I wonder is there any way to get them all in there, so you dont have to write that 9 times... i guess you could make an array, then call the onRelease from the array of button indices.. but im not sure.
          • 2. Re: Very simple request for help!
            yarkehsiow Level 1
            ...and dont forget to give the button an instance name in the properties panel.
            • 3. Re: Very simple request for help!
              pandemicxor Level 1
              ok, so I did what you said, i put the code on the main timeline with the buttons on it. gave the button an instance name, and put that into the code:

              Main.onRelease = function() {



              But it still does not work.

              I have reuploaded the file, please help! :)
              • 4. Re: Very simple request for help!
                2m Level 2
                Yor actions for the highlightnin cancel out the button actions. If you have movieclips or buttons inside each other only one can recive mouse events.
                • 5. Re: Very simple request for help!
                  pandemicxor Level 1
                  Well, 2m, thanks but that does not help. Can someone please take a look at the file and mabye fix my problem. I cannot seem to do it. The button inside the movie clip is the same button inside all of the other movie clips so if i change the code of one, it will change all of them, which kind of defeats the purpose of more than one button. Please someone help and email it to me @ pandemic[at]impulse100.net
                  • 6. Re: Very simple request for help!
                    2m Level 2
                    I'm sorry to hear that my answer didn't help, but it is the truth - plain and simple.

                    Your system won't work the way you have set it up.

                    It isn't hard to do though. I'll try to explain:
                    (even though that'll take more time than doing it myself, but what would be the benfit of that...)

                    First thing I'd suggest is using movieclips only, and no buttons. (Buttons are sort of outdated since flash 6, though they remain usefull for quick and simple animations.)

                    So you make one clip that has the animation in it (as you allready have), and put stop(); actions at the two obvious frames. Naming them frame after them "lo" (frame 2) and "hi" (frame 11).
                    You then place this clip in an other clip, and give it an instancename of "hiLihght_mc" (the one inside).
                    After that you place the clip that has hiLight_mc inside 9 times on the stage, naming it main_mc, news_nc, etc.
                    Now you can put the following script on your first frame:

                    main_mc.onRollOver = function(){
                    main_mc.onRollOut = function(){
                    main_mc.onRelease = function(){

                    and so on...

                    You could improve this by using arrays, or working with properies of parent clips, but that wouldn't be much clearer.

                    I hope that helped.
                    • 7. Very simple request for help!
                      pandemicxor Level 1
                      yeah, that worked!! :D

                      Thanks alot 2m.