Change the color of a button programmatically

I would change the background (or fillColor?) a button programmatically. Methods to achieve that documentation do not seem to work. For example, the following code to change the color of the button with the id buDel does not produce an error but also, it does not change the color of the button:

buDel.setStyle ("fillColor", "#e5507a");

I also tried this using the backgroundColor attribute in the setStyle method.

Hello

You can use a button skin. Please go through the following links:

1) http://www.asfusion.com/blog/entry/stateful-skins-in-flex-3e-color-transitions-in-buttons--opportunity

2) http://livedocs.adobe.com/flex/3/html/help.html?content=skinning_5.html

( http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ 3)

Thank you and best regards,

------------------------------------------------------------------------------------------ --

Vibhuti Gosavi . [email protected] | www.infocepts.com

------------------------------------------------------------------------------------------ --

Tags: Flex

Similar Questions

  • How to permanently change the color of a button

    I use an action to change the color of a button.  It works but the color changes for only about a second and then back to the original color.  How can I make the color change permanently?

    Sigh, if a question was clear, that he would not take as long to get a response. I knew there was more than simply by changing the color of a button, where my questions.

    Personally, I would never trust effects for this particular case. They do not always work as expected and even less in 8.0.1 then 7. In addition, as this has always been the case, the application of effects by a step (or shared action) has a lot of limitations, because you cannot set the duration of effect, or specify the path, if it is a motion effect. The only solution that I found and explained a long time ago was to create a custom effect to apply. But the workflow is quite heavy: first he must create the effect based on time with the correct time and settings, then you can save it, but it won't be available immediately in the drop-down list in the dialog of AA. You must apply the effect custom time once, before it becomes available. BTW, the default duration of the tint to apply is 2secs, which cannot be changed in the AA dialog box.

    I don't see your response to Ajit, for some reason, maybe because it is personal and I am just a user. My approach would be to replace the original button with a touch of the color that you want, something as I used in the dashboard in this blog: Captivate 8 - first adventures - Captivate blog

    Forums act as strangely today as effects in Captivate, now the answer to Ajit popped up.

    Text buttons will always have the appearance of the system buttons, you can not change their color. It can be done with text buttons but once again, I never use them more because the form buttons appeared. Those are much easier to style and offer more choices. Furthermore they can be used on master slides and timed for the rest of the project, and you can even insert on Question slides.

  • Using Javascript to change the color of a button

    Hello

    I am changing a button from blue to red when selected.

    The button is named myShape.

    I tried:

    this.myShape.style.color = "FF0000";

    but no go.

    I also tried just setting the myShape as a clip instead of a button, but no go.

    The function of the button works as I have an alert is triggered when the button is clicked.

    Thank you

    Do you want to change the button color as long as it is which is clicked, or discoloration permanently after summer on it?

    If you just want to change while the click occurs, it's super easy with a button symbol: How to create buttons with Adobe animate (you would simply adjust the "low" State to be of whatever color you want.)

    If you want to permanently change, you could create a clip below an invisible button, and when the button is clicked you might it have to reach a specific image in the clip. in this image, you can use a shape tween to change the color of the shape of button, or you can simply use a keyframe to set the color of what you want it to be.

    Here is a small example of work of two of these options: https://www.dropbox.com/sh/jnrerw6suqfmpu6/AACC8_yuznQzf7h3esVU5VXya?dl=0

  • Change the color of text button overview

    Hello

    I used text buttons in my project and I want to change the color of overview. How can I do?

    I couldn't find anything in the style!

    Thank you

    Buttons text takes up the style of the buttons system, you can't control them at all.

    Best way would be to replace the text by form buttons buttons, which you can style so that they perfectly resemble text buttons, but you can control the style of the three States. I recommend to do with the object Style (on CP8) Manager.

    Transparent buttons don't have any rollover State, you can also use image buttons but then you must create three different images with proper nouns, such as image buttons you have included in the CP.

  • Change the color of a button

    How I can change (on the Enter event) the color of a button text another color and vice versa by default at the exit.

    Effect of links

    Thank you

    You can use this.caption.font.fill.color.value to change the color of the text. I did using the mouseEnter/mouseExit events to create a substitution effect.

    Come in:

    This.Caption.font.Fill.Color.Value = "255,255,255"; White

    Output:

    This.Caption.font.Fill.Color.Value = "0,0,0"; Black

  • change the color of radio button

    Hi guys

    How can I change the color of a white radio button. I tried to add a class, but his does not work.

    V thanks a lot in advance

    Hi Ken and DottyDog,

    It's true, and it's Roger Johansson aka "456 Berea Street" always points back. And so it is really therefore also read its general articles.

    Hans G.

  • Change the color of a button when clicked

    Hi all

    I'm relatively new to Adobe Captivate and created buttons that allow a users through each step with a new screen that appears. I would like to implement the buttons so one a user has clicked on one of the steps that it changes color to show that summer above.

    Is it possible through Captivate? And if so, how do I go about this?


    Thanks a lot for your help!

    Amanda

    The best way to achieve this is simply having two buttons in exactly the same position on the slide.  Define their colors you want.

    One button begins hidden and another begins illustrated (Visible in the output selected in the Properties tab).  When we click the button it needs to run a standard or advanced conditional action rather than just a single action as this will allow you to do more than one thing.  Whatever you want the button is one thing, the second thing, it's to hide the already visible button and display it previously hidden, this has the effect to make it look like the button has changed color when in fact you actually replaced by one single button for another.

    I would say the best type of button to use in this situation would be a form of Smart serve the value button.

  • Change the color of a button/box/radiobutton...

    How I would approach (even if it's through actionscript) change the Green by default "glow" on the components button, checkbox and radiobutton to the color #B50C00? Thank you!...

    Nevermind - got it! :

  • Change the color of a button when you click on it in multiple colors

    Ive been given the task of creating a map for a major renovation of our hotel. I have limited experience in Acrobat and so all the reccomondations script would be greatly apprecated.

    I need to create a pdf file that management can click on a button/box (just something to cover the room) and be able to cycle although three colors independently to see quickly what the State of each piece. There are 884 rooms on eight floors. Ive fixed a section of one of the floors. Thanks in advance for any help.

    Level Four Section.jpg

    So let's say you have a button called "Room1". Set its fill color to red (most of the columns and rows from center left) and add this code as its MouseUp JavaScript action:

    var field = getField ("Room1");
    If (color.equal (field.fillColor, color.red))
    field.fillColor = color.green;
    ElseIf (color.equal (field.fillColor, color.green))
    field.fillColor = color.blue;
    ElseIf (color.equal (field.fillColor, color.blue))
    field.fillColor = color.red;

    If you need to apply it to several areas, you can create a script doc-level, as follows:

    function switchColor (fName) {}

    var field = getField (fName);
    If (color.equal (field.fillColor, color.red))
    field.fillColor = color.green;
    ElseIf (color.equal (field.fillColor, color.green))
    field.fillColor = color.blue;
    ElseIf (color.equal (field.fillColor, color.blue))
    field.fillColor = color.red;

    }

    and then each button MouseUp action simply call you the function with the name of the button as a parameter:

    switchColor ("Room1");

  • change the color to buttons

    Hello

    I have a series of buttons placed side by side. I'm changing the focus from one button to another using the navigation keys. Now the problem is the update is not clearly visible. Is there a possibility to do?

    I had an idea to use the option of color change, when the focus is on a button changes color to some specific color and the rest in a few other specific colors. But I am not able to implement clearly. so please give me an idea...

    Thanking you,

    sushmith

    If you want to change the color of a button, you must watch what kind of button that you use.  Not all the buttons can have their changed colort.

    If you are looking for a professional to look at it, you don't want to do a colorbook either by changing each button in a different color.

    What you can do is put behind each button an LED indicator that is slightly larger then the button itself.

    When the button has the focus, set the indicator.  And it will turn on.

    It's a little more work, but it looks so much nicer.

    Personally, I don't like to mess with colors.  I like the simplicity.  That's why I use systembuttons, who already have a blue surface when they have developed

    Hope this helps

  • You can change the color of the quiz answer radio buttons / checkboxes?

    Captivate v5.5

    I like to use a background image on my quiz slides (see below) and thus answers boxes option and check boxes (which are gey) do not stand out as much as they would on a white background.

    Quiz boxes.png

    I know that I can reduce the parameter Alpha of background or even use a different background, but before we go down this path, is there anyway to change the color of these buttons/boxes or make them stand out more?

    Noel

    Why don't you simply place a point box culminating or rectangle behind the quiz answer text captions?  Just make it white and set the transparency on this box to be about 50% or more.  The legends of the response text will always be on top.  The area under expected to reduce background noise.  It should only be slightly larger than the area occupied by the text captions.

  • Cannot change the color of the Label for the Radio button

    Simple question...

    Why I can't change the color of radio button to white?

    Code:

  • How can I change the color of the icons of navigation buttons?

    I was wondering if there are modules or mods for 25 of Firefox that would allow me to change the color of the icons on the navigation buttons.

    I think along the lines of the old style where the buttons next and previous lit up green reloading, in blue, stop at home with a mixture of yellow and white, and red when, they are clickable.

    I find with Firefox 25, I get light when gray grey and dark grey when active, I think is a little hard to tell at a glance. I prefer the colour keys and hoped there was an add-on that would allow me to change this in Firefox 25.

    You will need to search the site of Mozilla Add-ons to see if you can find a theme with colors that suites you.

  • I want to change the color of the firefox button, the button menu is normally orange what file/line in the as I need to change to change

    I just want to change the color of the button but it there as many files of code so much, and I can't find a page that will tell me it please help

    You can change the color by using the App button color- https://addons.mozilla.org/firefox/addon/app-button-color/ module

  • Programatically changing the color of the buttons on LV OI

    Hello

    I modified the sample operator interface supplied with TestStand.

    Buttons are linked to subsequences, so when a button is pressed a sous-suite is running (Boolean buttons).

    I want to make is that, once a sous-suite was called and the result was OK (pass), then the color of the button should going green.

    If the subsequence is down while the button should turn red.

    Thanks for your suggestions in advance.

    Hello

    You can find an example in the Finder of the example: 'property Nodes.vi ". It shows how you can change all properties of an object in your program.

    You can find more on zone.ni.com, like these examples:

    -L' use of nodes property to change the color of a bar sliding https://decibel.ni.com/content/docs/DOC-2133

    -Programatically change the color and visibility of a Boolean value by using property https://decibel.ni.com/content/docs/DOC-16569 nodes

    Kind regards

Maybe you are looking for