Flex :: Listening For Enable/disable State Change?
Dec 2, 2009For my custom components, when they go from enabled to disabled or disabled to enabled, I want to trigger a custom event. I can't find any related events in the livedocs.
View 2 RepliesFor my custom components, when they go from enabled to disabled or disabled to enabled, I want to trigger a custom event. I can't find any related events in the livedocs.
View 2 RepliesI don't know if this is too difficult or too easy. My custom component is trying to listen to the main application's state changes using StateChangeEvent.CURRENT_STATE_CHANGE, but it's reporting its own state changes.
View 2 RepliesHow can I enable or disable a group of components in flex (flash builder 4)?
For example, if I have a window with several fields, I want to disable them based on the users permissions.
I know I can add the enabled="true" or "enabled="false", and I can also use enabled="{writeAccessVar}"
However, I am looking for more ideas, as I might have more than one group of fields on the screen, or more complicated user permissions.
For example, I will currently have one field with write access, the other fields on the screen read only for a certain user level.
For a higher level user, all fields are writable. Lower level, all are read-only.
I would like the native Flex checkBox to change state only, when the box is clicked. If user clicks the label the state shouldn't change.
The click event cannot be muted as it is utilized in parenting components.
how to obtain such functionality? How to detect, that user has clicked the label?
I have skin a button with up, down, over, and disable states. I hope to know if there a code enable a button to keep press (down state) when the user press and hold a specific key link to that button. Something like down_button state.
View 2 RepliesIs there a way to Enable and Disable specific tabs in a tabBar? I found one example using a VBox within the ViewStack but I'm using NavigatorContent.
View 4 RepliesIn my flex application im using a datagrid with following columns [code]now i want to disable the checkbox column on fetching data..after datas are populated in datagrid if user selects any of the field in datagrid for editing..the checkbox for that selected row should be enabled...other rows checkbox should be disabled..
View 1 RepliesI'm developing an application using the Google Maps API with Adobe Flex Builder 3. Wrote the "HelloWorld" code provided by the GoogleMaps Reference...
[Code]...
everything goes well but the application consist on a cartesian plane that, optionally, could have the GoogleMap displayed on the background. The point is that I don't know how to hide the map once it is loaded. I would like to load it only if I click on a checkbox
I came here after searching over the GoogleMaps Reference for some "enable/disable map" function, but I had no luck.
My itemrenderer has 2 custom states, no hovered state, and no normal state[code]...
When I initialize it, I force it to go to state2. The problem is that when the mouse rolls out away from the item, it relapses back to the first state state1. It's kind of weird since I don't really have a hovered/unhover state.
I have a piece of software I'm working on that is using a viewstack with 3 canvases. With the change event I need to look for index 2 which is the last canvas when it changes to this canvas I need it to grab data from inputs from the previous two canvases.Within the viewstack events I've assigned the function change() to the event childIndexChange.
Here is the method:
private function change():void
{
[code].....
I've got a whole bunch of data being displayed in different Labels, now I'm adding an edit state. I'd like all the labels to "transform" into TextInputs. I was just wondering if it possible to uses states to change
View 1 RepliesI have a button with a click event of "currentState='someState'". Is there a way to tell component to do some function like for example "Function()" when the state changes to "someState"? So execute a function when the state is changed.
View 1 RepliesI'm just wonder if its possible to change States via a function in flex?
View 1 RepliesFollowing is a simplified version of my mxml:
[Code]...
"A term is undefined and has no properties..." which points me to the line this.parent.currentState='edit'.
I currently use: Flexglobals.toplevelapplication.component1.compnent2.currentState = 'something';is there a better way of doing do? Can I bind the state of a components to variable in my model?
View 2 RepliesI can do this:
<s:Button id="Btn" enabled.State1="false" />
But the following code is giving me an error.
private function enableDisable():void{
Btn.enabled.State1="false"; //Error: Access of undefined property State1
}
How to code enabled.State1 in ActionScript?
I bought a license for a 3D Carousel component HERE. What I'm trying to do with it is load movie clips when the user clicks an image using a lightbox effect that I built in Flash.Everything is working fine except that when the movie clip loads on top of the site, I want the buttons of the carousel component to be disabled so the user can't load another movie until the one active is closed.I know how to disable a button, which I'm assuming would work here, but I can't for the life of me figure out how to get the button instance names out of the component to disable them.[code]Does anyone know if I could modify this event to give me button instance names instead of obj.id? Or, failing that.if there is a way to just disable the whole damn thing?
View 1 RepliesI have two functions, I need one that of them at the start would be disabled and after decent amount of time or when x = 1000, function would be enabled and become active. How can I do that?
View 1 Repliesi have been pulling m hair out here trying to work out how to toggle on and off states on my buttons. Once a user clicked one it fades and disables ok as I want but i also want it to enable and fade back up again when they select another button. Below is my code:
[Code]...
I'm looking to create a bit of code the allows you to click on a button and disable the rest and so forth reinable when the others have been used
View 2 Repliesenebling and desabling MC�s(as buttons) and levels.Frequently I see websites that when you click on one menu item, until something loads the menu is disabled, or in other cases is usua� to see in gallerys, when you click an image the image open on top of things, and you can�t access the button or links being the image.
1- is to put a tranparent button on top of the movie or image that loads whit some closing actionscript, but i think this way is not nice;
2-the second one I though is to write some function for enabling and disabling things, but if I have lot of elements it�s not nice, and the third one is to add a Listener to Stage whit some onMouseDown event that closes the level or the swf loaded.
is there anyway to disable the button while the others are enable what im trying to say if let say im on a about section of the site and i want to disable the about button while the rest is enabled
View 5 RepliesI have a meny here with 5 buttons. They are called "undermeny1.btn1", "undermeny1.btn2" etc. What I need to add to this code is that when I click Button 1, this button gets disabled, and if I then click lets say Button 4, Button 1 gets enabled and Button 4 disabled. Maybe an easy one but I just cant think straight.
Here's the code for my buttons ("undermeny1" is the mc in which the buttons live);
for(var i=1;i<=8;i++){
var meny = undermeny1;
_root["meny"]["btn"+i].ivar=i;
[Code]....
So I have a series of movie clips(info_mc) with a movie clip(hover_mc) and buttons(info_btn) inside them. The reason I did this is because I had problems controlling a movie clip in a button.
So what I would like to do is group the buttons together somehow so that when one is pressed the others go .enabled=false; I think setting up an array might be the way to do this, but I don't know how to set one up correctly.
But wait, there is more What I also want to do is have another series of buttons, that when pressed allow the array of info buttons to become enabled.
I want to create some AS to disable and enable a button. Let's call this ButtonX. I want this button to appear disabled at first, and then allow the user the option of enabling this button (ButtonX) by clicking another button. Let's call this ButtonY. I cannot get this to work. I am attaching the code I am trying. I have this AS added to ButtonY and ButtonX is the instance name for the button I want to de-activate-activate.
View 11 RepliesOkay I just need advise on how to make this simple instead of what I have now....it's working very well ...perhaps someone can shed light on me how to make it as more elegants code...because it gonna give me the problemo when Im dealign with 2 objects what about 4..to 6 objects my code will more longer
Code:
cbCC.visible = false;
cbBCC.visible = false;
[code].....
I d'like to have your opinion about the best and effective way to enable/disable properties on a list of MC buttons.Let's say I got a menu of 5 MC links and I click on one of them. I want to disable the mouseEnabled propertie on it and change its color. But most important reset all the other ones.That's what I have so far but I feel it's not the best thing to do:
Code:
selectedButtonId = e.target.id (get the id of the clicked button in the buttonsArray)
for (i=0, i<buttonsArray.length, i++) {
[code].....
I want to implement this script: [URL]...that is doing this "magic [URL]
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" );
navigateToURL(adobeURL, "_self");
Into something that change the current state.
Here`s my custom InfoWindowTabbedComponent: [URL]
Having problem enabling buttons on levels other than the _root once they are disabled. I have a feeling it's got something to do with the createEmptyMovieClip.[code]...
View 6 Repliesi would like to know how to enable and disable a button via xml. this is my code.
Code:
if (worksList[cp].attributes.button = "true"){
button.enabled = true;
}else if (worksList[cp].attributes.button = "false"){
Button.enabled = false;
}