Flex :: Setting Disabled Button Appearance In Flex?

Apr 11, 2011

I'm making a trivia in an Air application, a question, three buttons, after you choose one, the right button gets coloured green, the wrong ones get coloured red. I was trying to do this changing the styles, so I created a Button.Right and a Button.Wrong style, but I also need to disable the buttons so they don't get clicked more than once while I'm showing the correct answers.

So I'm having trouble making it so the buttons don't look greyish and with the alpha turned down when I set their enabled property to false. I'm trying to be as minimalistic as possible here, changing disabled-overlay-alpha or disabledOverlayAlpha in the css file doesn't seem to do the trick, neither does changing disabledBorderColor

View 3 Replies


Similar Posts:


Flex - Changing The Appearance Of A Disabled Checkbox?

Jul 22, 2009

A disabled checkbox in flex looks very "light" colored, almost invisible. Is it possible to make it look like an enabled checkbox which does not do anything on a click event?

View 2 Replies

Flex :: Button Skin Disabled Alpha Setting Ignored?

Nov 14, 2011

I attempted to build a Flex 4 skin for a Spark button, typical practice. I adjusted the colors and other styles to my liking, including using dot selectors to specify alternate colors and such during different states. However, these are all ignored when the button is disabled. Regardless of what I do, in the disabled state, my button always has the wrong color and is alpha'd to 0.5 (even if I specifically state that alpha.disabled="1"). All the other skin states work as expected. This is my custom skin. If it were working correctly, it would appear to have no shadow or highlight, and would be a gradient grey color. Instead, it appears as a 50% alpha version of the up state (shiny green).

<?xml version="1.0" encoding="utf-8"?>
<s:SparkButtonSkin xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="[URL]"
minWidth="21" minHeight="21" alpha.disabled="1">
[Code] .....

This is the code used to create and then disable the button:
_action1Button = new Action1Button();
view.actionGroup.addElement(_action1Button);
_action1Button.enabled = false;

The error was that _action1Button is not the actual button, rather, it's the container of the button. Doh! Switching it to _action1Button.actionButton.enabled = false; fixed the issue.

View 1 Replies

Flex :: Change Button Appearance On Click?

Apr 26, 2010

I wahnt to change button appearance when it was clicked.

<?xml version="1.0" encoding="utf-8"?>
<s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]..........

Is there a method using states? I could then use the skin convention.

View 2 Replies

Flex :: Button - Use The Disabled-skin Defined In The CSS

Apr 13, 2010

I have a CSS file containing the following definition :

[Code]....

Now, I want to use the disabled-skin defined in the CSS, as the upSkin of b1. So something like b1.setStyle("upSkin","Tab.disabled-skin"); But I am struggling with the exact syntax of the second argument for setStyle. What should I use for the second argument for setStyle method?

View 1 Replies

ActionScript 3.0 :: Flex In Properties View Convert To CSS Button Disabled

Jun 15, 2010

I am trying to once example in Flash Builder 4. But I got one error. When I go to In Design mode, select the Label control that reads Company Vehicle Request Form. After that when I go In Properties view, then I want to click the Convert to CSS button. But that time Convert to Css button is disabled.

View 2 Replies

ActionScript 2.0 :: Keeping A Disabled Button Disabled After Navigating Away From The Frame

Aug 2, 2008

I'm making a VERY basic Jeopardy game, and I need buttons to be disabled after being clicked on once.

Oh, and I'm working in CS3, but I'm using AS 1&2 because that's what I learned... I have no idea how to use AS 3...

example: frame 1 has btn11 in it. btn11 when clicked takes the person to frame 2. when done with frame 2, they click on return.

the return button (btnReturn1) has the following AS

on (release) {
gotoAndStop ("Round1",1)
btn11.enabled=false;
}

the problem is that it works at first - the button disables when I get back to frame 1, but the next time I click a different button then return to frame 1, the first button I disabled isn't disabled anymore.

my actionscript so that my disabled buttons stay that way no matter how many times I come and go from the frame? or if you have a better way to do it, that'd be great. basically, it's like the jeopardy screen, and after "songs" for 200 is clicked, I don't want it to be clickable again at all.

View 1 Replies

Flex :: Setting Button Width With Fx:Style?

May 30, 2010

I have 4 buttons, all of them have the same width.

<s:Button id="btn1" width="{btnWidth}" />
<s:Button id="btn2" width="{btnWidth}" />
<s:Button id="btn3" width="{btnWidth}" />
<s:Button id="btn4" width="{btnWidth}" />

Is it possible to set their width with Style, something like this: I tried it, but auto-complete isn't working, which leads me to think that there's something wrong with the syntax. Basically my goal is to not have the width property set specifically for all 4.

View 1 Replies

Flex :: Setting The Default Button In Preinitialization

Jul 29, 2011

I have a more than one container in a view. I am trying to set default button at the moment page is loaded so that when I press enter, function that handles keydown event called. If I simply set default button in preinit() function, it does not work.

View 2 Replies

Flash :: Altering The Appearance Of An AdvancedDataGridColumn And Mx:ToggleButtonBar In Flex

Dec 1, 2011

I have two things I wish to change with the display elements in flex. The first on relates to and AdvancedDataGridColumn in a AdvancedDataGrid. This is shown in the picture URL with the words "Word Student Teacher ..." These are the headertext of an AdvancedDataGrid. I want to remove the little "1" symbol and disable the abiliy to click on the column and have them sort.

The second is also shown in the picture and it relates to the mx:ToggleButtonBar shown with the text "Pronunciation Pitch Timing Loudness" At present "Pronunciation" is selected, but is is possible to make this clearer? For example have the currently selected tab show in a different color?

[Code]...

View 1 Replies

Flex :: Change The Appearance Of Nodes In A Tree Control Using An Extended TreeItemRenderer?

Nov 4, 2009

I'm using a tree control that I want to customize. The data items in the tree's dataProvider have a property name that should be used for labeling the node, and a property type that should be used to select one of several embedded images for use as an icon. The simplest way to do this is by using the labelField and iconFunction properties.

However, I wanted to get started with item renderers and open the door for adding more complex customization later, so I tried making my own item renderer. I extended the TreeItemRenderer class as follows and used it in my tree control:

class DirectoryItemRenderer extends TreeItemRenderer
{
[Embed("assets/directory/DefaultIcon.png")]
private static var _DEFAULT_ICON:Class;

[Code]....

This code has no effect whatsoever, icon and label in the tree control remain at their defaults. Using trace(), I verified that my code is actually executed.

View 2 Replies

Flex :: Disabled Canvas Look And Feel?

Jul 27, 2009

Is there a way in Flex by which a disabled canvas looks exactly the same as an enabled canvas? I haven't been able to make sense of disabledOverLayAlpha and disabledColor properties for a Canvas component.

View 1 Replies

Flex :: Disabled The Doubleclick In Linkbutton

Nov 24, 2010

when i doubleclick on the linkbutton its still working i dont know even though i have made linkbutton doubleclickenabled property =false too.

View 1 Replies

Flex :: Know Exactly What Numpad Key Is Pressed In AS3 (with Num Lock Disabled)?

Sep 11, 2009

In Actionscript 3 I see that if I press the "8" key (from the numpad) I got the result of keyCode of the numpad key "8", but when I disable the "Num Lock" and press the numpad key "8", the event I receive the keyCode of the Up Arrow key...

How to difference between the keys of the numpad (with Num Lock disabled) and the original keys, such as the Arrows, End, Insert, Delete and so on?

I've tried using the keyLocation property of the event, the value of that property is 0 for the arrows and 3 for the numpad, but when the Num Lock is disabled the value for the 4, 6, 2 and 8 in the numpad are 0, so I can't difference between the numbers with numpad disabled and the Arrow keys.

Also the numLock property of the Keyboard class didn't work, because I can't know if I press the Up Arrow or the 8 whit Num Lock disabled (because they trigger the same event, or I think that)

View 4 Replies

Flex :: Combobox - Set A Control Focusable When It Is Disabled?

May 7, 2010

How to get focus for a disabled flex control. When a flex control is set with enable=false ,the control is not focusable and hence is not read by a screen reader. When a user tab's it should also go to the disabled controls.

View 1 Replies

Flex :: Show A Tooltip On A Disabled Control?

May 26, 2010

I'm displaying a list of buttons, some of which might be disabled. I need to show a tooltip on the disabled buttons with an explanation of why it's disabled, but it seems I can't disable the button without disabling the tooltip. Is there a simple way around this?

View 3 Replies

Flex :: TabNavigator Can't Handle Disabled Children?

Jun 8, 2011

I've got a problem while migrating my TabNavigator from Flex 3 to Flex 4.5. Stripped to the bare minimum, the following code will produce the bug, namely that the second child of the TabNavigator fails to be created properly:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"

[Code]....

Is this really a Flex bug, or is there something I'm missing? I'm using Flex 4.5.0.20967, and all of this worked well in Flex 3.5.

View 1 Replies

Flex :: Getting The Application's Enabled Disabled Event While Opening A Pop Up?

Mar 21, 2011

In my flex application I have several pop ups, when a pop up is opened the application is disabled and enabled back when the pop up is closed.Is there way to get application's enabled / disabled event and perform some activity like hiding a display object.I know, I can get open and close event of the pop up but I don't want to write it for all the pop ups and pay for maintainability.

PS: I am using PopUpManager to create pop ups.

View 1 Replies

Flex :: While Loading Data Make All The Components Disabled In Adobe

Sep 27, 2010

I have a vertical tab-bar with 4 items with different sub tabs. All the four items use data from a single xml file, which is a big file. When the user clicks on a tab, while the data is being loaded this error is shown. TypeError: Error #1009: Cannot access a property or method of a null object reference. I want to disable all the tabs while the xml file is being loaded.

View 3 Replies

Adobe Flex 4 Rendering Issues With Text In Disabled TextInput Component?

Apr 22, 2011

I have an application which displays employee information. If the user opening the detailed employee information page is not authorized to make changes I set the TextInput to disabled. Some users are reporting rendering issues with this. The TextInput's text value does not appear inside the box but is misaligned and is outside of the component. You can see the screenshow below of the disabled ID column where the numbers which are supposed to be in the TextInput box are far off to the right.

[Code]...

View 1 Replies

Flex :: Setting Compiler.theme Option For Halo/Flex 4 In FlashDevelop?

Jul 12, 2010

Here's what works with ant build.xml:

[Code]...

I tried the following values in Project > Properties > Compiler Options > Additional Compiler Options but none of them worked:

View 2 Replies

Flex :: Security - Setting Wsdl Service In Flex Project Crossdomain.xml?

Apr 7, 2011

How can i settings crossdomain.xml my flex project.* this is my crossdomain.xml.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>

[code].....

I've tried lots of different methods but my project send error message "Security error accessing url Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL [URL]"

put the file in different places

C:wampwwwMYPROJECTin-debugcrossdomain.xml
(my swf url : http://localhost/bin-debug/test.html checked http://localhost/bin-debug/crossdomain.xml its ok)
C:wampwwwcrossdomain.xml

I added the load line of the project

protected function application1_initializeHandler(event:FlexEvent):void
{
Security.loadPolicyFile("http://localhost/MYPROJECT/bin-debug/crossdomain.xml");
}

if flex server type select none everythings ok. but server type select PHP need crossdomain.xml how can i fix.

View 1 Replies

Flex :: Itemrenderer - Referencing And Setting A Single Item Renderer Instance In A Flex Tree At Runtime?

Oct 17, 2010

Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.

View 1 Replies

Flex :: Limit Pyamf Flex Sessions Or Setting A Timeout?

Feb 22, 2010

How do I limit my amf sessions to flex over pyamf?

I have set up a pyamf gateway to that serves value objects that originate from a django admin panel, through sqlalchemy to my authenticated flex client. It's working great, however there is a problem. My sessions are persisting and clogging up the server, so after about 20 or so AMF sessions are authenticated, it refuses any more until I restart the server.

View 1 Replies

Flex :: Setting Background-color For Flex Tree Component?

Oct 21, 2010

I have a Flex Tree component in my app. I set the icons for open and close.
BUT I can't find something about changing the default background-color from white to something different.

obviously there is no background-color setable in css...

View 1 Replies

Flex :: Flash Builder 4 Design View Vs Flash Runtime Appearance W/SDK 4.1?

Jan 22, 2011

Flash Builder's design view is worse than 3's (which at least was usable if you ignore some quirks), so WHAT do Flex UI designers (those who don't have paid design teams...) do to design a complex UI? Because Design View (also based on what a lot of people say about it..) gets more useless with every release.See image for some differences in design view vs.Flash. WHAT is causing this? css also posted..("Duration", "hr", "min" are mx Labels, the image size text is an mx Text comp.Project is an "mx only" SDK 4.1 project.) I don't even care that the spinners look different, I just need it to show me correctly sized stuff so I can position things via Canvas, or properly size containers.

mx|Label {
font-weight:bold;
font-size:12;[code].....

View 1 Replies

Flex :: Setting Button Width To Text Width?

Mar 28, 2010

I am creating a nav in flex that pulls in buttons dynamically from xml. THe problem i am having is setting the button width to the text width. currently the buttons are all the same width and if the text is larger then it just cuts off. I've tried a few ways of doing this:Setting button width to 100%On creation of the button try to set the width of the button to the text programmatically. Something like evt.target.width = evt.target.textWidth;

View 1 Replies

ActionScript 2.0 :: FLV Controller And Delayed Button Appearance

May 20, 2010

I'm having trouble with a controller I'm using with an FLV. I am a newbie when it comes to actionscripting. I have a project I'm working on that contains a 86:50 minute FLV and towards the end I will have a separate button appear to click on. The code I am implementing was from a different project that utilized the same functions but with a 4:49 minute FLV. I have an example of this at [URL]. As you can see the controller is set up for the 4:49 minute FLV and when the timer gets to 5:00 minutes that button comes in. I need to make the FLV play the whole way through and then at a specific point have the button appear and I can't seem to do it. Below is the only code I can see that pertains to this section.

scrub.onPress = function(){
scrub.startDrag(false, -365, scrub._y, 49, scrub._y);
dragging = "true";
}scrub.onRelease = function(){
var newNum:Number = (scrub._x - -365) * .7625;
mainVid.seek(newNum);
scrub.stopDrag();
dragging = "false";
[Code] .....

View 1 Replies

ActionScript 2.0 :: Dim Menu Item - First Button Gets Enabled While The Third Button Is Disabled?

Aug 3, 2008

This is something that is probably really basic but for the love of gawd I can't remember how to do it.

Example: 3 menu buttons, you press the first button and it executes a function and disables itself leaving the second and third button enabled. You then press the third button and the first button gets enabled while the third button is disabled. Same thing goes for the second button.

View 8 Replies

ActionScript 2.0 :: Communication - Controlling The Appearance Of A Radio Button After It's Selected

Feb 13, 2012

I've got a relatively simple problem with controlling the appearance of a radio button after it's selected. I'm using Flash CS5.5 and AS2. I've got a radio button set up as a two-frame mc, the first frame labeled "on", the second "off". When put on the stage with this code on it, it functions properly:

onClipEvent (load) {
answer = false;
}

Whenever I add additional code to the radio button mc (in this instance, telling an invisible mc in the same frame to gotoAndStop (2)), the radio button stops changing appearance. I've been using the syntax

on (press) {
tellTarget ("_root.OtherMC.OtherMC_2") {
gotoAndStop (2);

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved