5 Replies Latest reply on Jan 4, 2010 4:28 PM by cyber0897

    problem with link button color sceme

    jhardway1966

      I am using flash builder 4 and I really like the way it works. I'm currently am coming across a problems when using a link button. No matter what I do I can not get not get the componet to respond to any custom color request that has anything to do with the buttons background (ie base, rollover, selected). It only will use it's default colors only.

       

      I have spent alot of time on the internet looking for anything, tried making the component mx: instead of halo. I have tried AScripting around it and reinstalling the whole Flex frame work.

       

      I have made up a simple project with nothing but a link button, still having the same problem.

       

      Any Ideas.

       

      Thanks Jack Hardway

        • 1. Re: problem with link button color sceme
          Peter deHaan Level 4

          This worked for me in build 4.0.0.13210:

           

          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                         xmlns:s="library://ns.adobe.com/flex/spark" 
                         xmlns:mx="library://ns.adobe.com/flex/mx">
              
              <mx:LinkButton id="linkBtn"
                             rollOverColor="haloGreen"
                             selectionColor="haloOrange"
                             initialize="linkBtn.label = mx_internal::VERSION;"
                             x="20" y="20"/>
              
          </s:Application>
          

           

          Peter

          • 2. Re: problem with link button color sceme
            cyber0897 Level 1

            im not sure what exacly what ur looking for... but the problem i was having is the backgroud of the linkbutton always existed... so

            i included a new attribute to the link button, i basically set the "skin={null}"

             

            so my link button would be

            <mx:LinkButton label="LOGIN" skin="{null}" />

             

            this got rid of the background rollover...

             

            hope this helps...

            • 3. Re: problem with link button color sceme
              jhardway1966 Level 1

              Thanks

              Peter and cyber0897 I tried both

              here responses but still having the same result getting default colors only, no idea why, its killing me while forcing my hand to do the project in flex 3.

               

              Oh well thank again, I will keep looking.

               

              Cheers

              • 4. Re: problem with link button color sceme
                Peter deHaan Level 4

                Which SDK version/build are you using?

                • 5. Re: problem with link button color sceme
                  cyber0897 Level 1

                  hey... no problem... but try this one thing before you change, again im not sure exacly what ur trying to do... but sounds like ur just trying to change the linkbutton color and the background when you rollover is that correct?

                   

                  try...

                  <fx:Style>

                          .loginButton{
                              fontSize:41;
                              textRollOverColor:red;
                          }

                  </fx:Style>

                   

                  <mx:LinkButton styleName="loginButton" color="black" label="LOGIN" skin="{null}"/>

                   

                  this should change ur rollover color and remove the background color