10 Replies Latest reply on May 13, 2009 9:33 AM by kglad

    Rollover color?

    swdweb Level 1

      I have a flash menu that isn't made with buttons, but with one tween and it has a glow effect on rollover, it also expands. Is there any way to change the color of the text when it's rolled over (like it expands and glows). Here's the code for the rollover:




      import flash.filters.GlowFilter;
      import mx.transitions.Tween;
      import mx.transitions.easing.*;


      // Creates a variable with info about the Filter settings
      var myGlowFilter = new GlowFilter (0xFFFFFF, 2, 15, 15, 6, 100, false, false);


      this.onRollOver = function()
          this.filters = [myGlowFilter];




      this.onRollOut = function()
          this.filters = null


      this.onRelease = function()
          //Action code





        • 1. Re: Rollover color?
          kglad Adobe Community Professional & MVP

          you can use a textformat instance to control color.

          1 person found this helpful
          • 2. Re: Rollover color?
            swdweb Level 1

            I guess I should have put that I am relatively new to flash and this basic menu was made by someone else. I don't know how to write a textformat instance.  Can you tell me how?




            Actually, from what I'm discovering, this menu was made in a very weird way, it wasn't done with individual mc buttons, but all in one tween.


            the script in frame 1 reads as this:

            btn1.btnName = "name1"
            btn2.btnName = "name2"
            btn3.btnName = "name3"
            btn4.btnName = "name4"
            btn5.btnName = "name5"
            btn6.btnName = "name6"
            btn7.btnName = "name7"
            btn8.btnName = "name8"
            btn9.btnName = "name9"

            and only 1 mc and one tween.

            So HOW...do I get these buttons to act independently from one another without having to re-create the whole menu? This is done in AS2.  I basically want to have the rollover color change and I'd also like to make it so that the image stays enlarged when the user clicks on it and the page changes....but the way I have it right now is embedded on each page....should this menu be put into the css and all pulled from the same source?

            Thanks a bunch!

            • 3. Re: Rollover color?
              kglad Adobe Community Professional & MVP

              you sound like you're in over your head on this and you'll probably need someone to download your fla and fix it to suit your needs.


              but if you do one thing at a time, you may be able to do this your self.   you'll need to do some reading so you can learn the parts you need to learn.


              you can start with the textformat class.  it's easy to use:



              var tfor:TextFormat=new TextFormat();

              tfor.color=0xff0000;  // if you want red


              yourTextField.setTextFormat(tfor);  // to assign tfor to yourTextField

              • 4. Re: Rollover color?
                swdweb Level 1

                Yes, it is a bit over my head...I can do lots of basic things, I even created a wonderful intro, etc.  I have read multiple books, forums, tutorials, etc. but I never really know what I need to learn until I try to accomplish something and realize that it's something that I haven't come across before because I hadn't needed it at the time.


                I will try and research what you wrote and see if I can make it work.  Thank you.  If you read my other post, you can see exactly the problems I'm having with this menu.


                The biggest issue for me to overcome is that this menu was made with a tween rather than individual mc's.



                • 5. Re: Rollover color?
                  swdweb Level 1

                  Let me ask you a quick question....can the textformat class be used STRICTLY for the rollover color in my image and NOT the color of the text that shows in the up state?  If so, is there a special way to do that?  Also, sorry, you didn't specify in which frame that code needs to go....thanks for all your help.

                  • 6. Re: Rollover color?
                    kglad Adobe Community Professional & MVP

                    i read your other post and pointed out why you're not getting much help.


                    you need to approach one problem at a time.  i learned (and still learn) just like you.  if i have a problem to solve, i find out how to solve it.  i didn't read a book/books learn actionscript and then started creating code.


                    if tweens are you number one issue, then start reading about tweens.  try some experiments using tweens.  ask questions about tweens.  you'll get lots of help with tweens just like you'll get lots of help with any one issue you pinpoint.

                    • 7. Re: Rollover color?
                      kglad Adobe Community Professional & MVP

                      do have movieclip buttons or true buttons?

                      • 8. Re: Rollover color?
                        swdweb Level 1

                        There is only one movie clip and it only contains one tween which has 10 text areas that are being used as buttons.  If this menu had been made with individual buttons I wouldn't be having this much difficulty because I've done it before, but, this is something I have not worked with.  I'd be more than happy to send you the file so that you can look at it to see what I mean.

                        • 9. Re: Rollover color?
                          swdweb Level 1

                          I PM'd you with the link to my file.

                          • 10. Re: Rollover color?
                            kglad Adobe Community Professional & MVP

                            i replied.