Flex :: Deselecting Toggle Button Through UIComponent Reference

Nov 2, 2010

I've got some buttons that have toggle set to true. I'm trying to re-set the button's state to unselected. But, I can't access the button directly like:
button.selected=false.
I'm accessing the HBox's children which are the buttons. UIComonent doesn't have a selected property.

So, how do I de-select the toggle in this bit of code below?
for (var j : int=0; j < theHBox.numChildren; j++){
var child : DisplayObject = theHBox.getChildAt(j);
var myButton:UIComponent = child as UIComponent;
myButton.setStyle("borderColor", "blue");
myButton.visible = true;
}

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Deselecting Previous Button On Nav Click?

Jun 8, 2009

I have a navigation with three buttons. When one button is clicked, it turns a certain color. When the next one is clicked, that one turns a different color, and the previous one turns back to it's original color. So far when I click, the buttons turns colors, and then when i click on the other, the previous one doesn't turn back. Here is my code so far:

Code:
function navClick (e:MouseEvent) {
var mc = e.currentTarget;
switch (mc.name) {

[Code].....

View 2 Replies

Flex :: Change The Background Color Of A Toggle Button?

Jun 18, 2010

What is the easiest way to change the background color of a toggle button when it is selected?I've tried creating a custom skin for the button and applying it to the downSkin property, but I can't figure out how to change the background color from within the skin. Also I'd like to avoid using an image as a background if possible.

View 2 Replies

Flex :: Remove Buttons Border From Toggle Button Bar?

Aug 15, 2010

how to remove the border of a togglebuttonbar button, with keeping the theme color??

i want to put the style in css file

View 2 Replies

Flex :: Stop A Toggle Button From Changing State?

Nov 12, 2010

I'm trying to stop a toggle button from changing state when clicked, based on some conditions, but I'm not sure how to do it.

I don't want to disable the button, because flex 3 styles don't allow me to get the visual effect I need.

EDIT:

I've tried this but it does not work:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="_init()"

[Code]....

View 3 Replies

Flex :: UIComponent Extended Class Isn't Showing UIComponent Extended Class

Aug 18, 2009

I have 1 class (that is extending a UIcomponent) that is representing a component. In that component I create different instances of another class that is also a UIComponent but this class doesn't show up in de first class. I see that it is running and that it has the correct hights but I got the feeling that it doesn't show up with this hights. If I trace I see the width and height is 200 X 200 but there is still nothing visible in my component.

View 1 Replies

ActionScript 2.0 :: FLASH 8 - Toggle Button/released State/pressed Button

May 18, 2007

I have a series of buttons inside an array. I am trying to get the buttons so that once they are pressed, they remain in the over state. Which is a darker color than the up state. So that people know which button they have pressed. Is there an easy way to do this for buttons?

View 1 Replies

Javascript :: SWF Video With Controls (toggle Sound On / Off And Toggle Play / Pause)

Jan 10, 2011

I'm new to flash and just need to do a simple task but I can't manage to get it to work. I'm trying to import a video (flv) into a SWF container and need to AS functions which should be exposed to JS (using liveconnect or anything else). These two function should toggle sound on/off and toggle play/pause. I dont need any user interface or a full featured player, just these two functions.

View 1 Replies

Flash :: How To Use UIComponent In Flex?

Oct 9, 2009

I am new to Flash/Flex. I would like to use a Component I created in Flash extending fl.core.UIComponent. How do I use this in Flex? Do I just export it as a swc or do I have to use the Flash Flex 3 kit which will convert it to a UIMovieClip. That does not sound right.

View 2 Replies

Flex :: What Does UIComponent Add To DisplayObject

May 19, 2009

I am trying to understand the interaction between Flex UIComponents and (Flash?) DisplayObjects... But it's not clear to me what the UIComponent class "adds" to DisplayObject. So, what can a UIComponent do that a DisplayObject cannot?

View 2 Replies

Professional :: Toggle Button Via The Button Component?

Oct 18, 2010

I'd like to learn how to use Components in Flash, and the documentation and tutorials I find are beyond my comprehension. I usually go to FlashKit and just rehash someone's code... but again, I'd love to learn how to use Flash Components.So I did a tutorial on the toggle button, but it was:1. Click button, and a window pops up at different location on canvas2. Click button again, and the same window dissapears.This is for a videogame, and I'd like a button to be click and that same button be populated with a new graphic. What I mean is, the graphic is a skull, and I'd like to have it start as a dark skull (as if a negative value) and when you click it the skull appears... click it again and it's gone (or that negative or dark skull representing it's off).So this differs from the tutorial I did because the pop-up window is the button itself, and the window that pops up would obstruct me from click it again.

View 3 Replies

Flex :: Update UIComponent Size?

Feb 23, 2010

I've created a AS3 class which extends UIComponent so that I can easily add it to my MXML layout. It works fine, but I'm trying to figure out how to update the UIComponent width and height dynamically. I want my super UIComponent to draw a border around the content, so I need get the specific 'content' dimensions in order to do this.

I understand the idea of UIComponent is that you are supposed to specifically set the width and height... but I am literally only extending it so that I am able to use my custom component with MXML easily.Is there a method in which I can get the width and height of a UIComponents 'content'?

View 2 Replies

Flex :: Difference Between UIComponent And Sprite ?

May 23, 2010

What is the difference between a UIComponent and a Sprite in Flex.

View 1 Replies

Flex :: UIComponent Click Handler?

May 27, 2010

I'm trying to put a label and an image on a UIComponent, side-by-side. I want to use UIComponent for efficiency reasons, and the entire component is more complicated than just a button with an icon.

I'm trying to get a click handler on ther entire UIComponent so that when a click happens on either the label or the image, the same [click] event handler is called. If I add a click handler on the root component, it works, but when I introduce space between the label and the image, the space between them becomes un-clickable. I produce the space by using the move(x,y) method for the label and the image with a small gap between the x/y coordinates.

View 3 Replies

Flex :: Change The FusionWidgets UIComponent?

Aug 29, 2010

I'm using the ravis FusionWidgets component in flex to create guages.I have a problem to change a guage in my program.I build an mxml component with the guage like this:"ns1:FusionWidgets id="myGuage" width="{guageWidth}" height="{guageHeight}" FCChartType="{guageType}" FCDataXML="{guageXML}" y="0" x="0"/"when the guageType and the guageXML is the bindable data providers.when I place this component in first time, the providers don't contain nothing and i let the user to change them in my flex application.the problem is that when the user change them, the guage doesn't update itself.I know that when I change a bindable data provider, the component must be changed.

View 1 Replies

Flex :: Nothing Displays When Add UIcomponent To Canvas?

Oct 22, 2010

i am trying to add a uicomponent which contains an object of a custom class the extends UIcomponents and i want to display this uicomponent to canvas i have done no error compile or run time but it does not display the Uicomponent.

here is code;

var item:RecordRanderer = new RecordRanderer();
item.randerItem(child);
item.x=20;

[Code]....

View 2 Replies

Flex :: What Is The NonInheritingStyles Property On The UIComponent For

Nov 10, 2010

What is the nonInheritingStyles property for on the UIComponent?

Is this a list of styles that the component does not inherit from the container?

Or is this a list of styles that have been set inline or in code so the component is just telling me that they are NOT inheriting from the container?

If it's the first why are their values set for this properties?

View 1 Replies

Flex :: Add Uicomponent Inside A Sprite?

Apr 15, 2011

i want to add UIComponent inside a spite. here is the code:

private function make() : void {
var circle : Sprite = new Sprite();
circle.graphics.beginFill(0xFF0000, 0.2);[code]......

the problem is that button is added, but is not displayed. if i do reversed - add sprite to uicomponent - everything works fine, but this way it doesn't work. i tried to use invalidate functions for button etc... even tried making "circle" as UIMovieClip, but no luck - button is still invisible. also if i simply do "addChild( button );" - it is shown,how can i add a button inside a sprite?

View 2 Replies

Flex :: Get The Reference To A Newly Created Button With Actionscript?

Mar 11, 2010

I have a MXML button:

<mx:Button id="myButton1"/>

How do I create N number of Buttons with Actionscript: myButton2, myButton3, myButton4... myButtonN ?

And how to get the reference to the newly created buttons right after they are created? Like I should be able to do myButtonN.x = 100 right after it's created.

View 1 Replies

Flex :: Games - Using Canvas Versus UIComponent?

Oct 10, 2009

For developing simple games with the Flex SDK, what are the consequences of using a Canvas object, versus a UIComponent object, as a drawing surface? Are there performance issues with either one? Are the methods generally the same? Searching around, it seems that most sample code I've found uses UIComponent. Is this just customary, or are there reasons?

I already know one odd difference - I had developed a simple Pong game using:

public class MyGameCanvas extends UIComponent

and then decided to replace UIComponent with Canvas. This caused the line to fail:

[Code]...

However, I have to confirm something, being new to Flex and the various terminology. I'm presuming that people mean I should not be using MXML for games, when they said Flex SDK. Since I thought the Flex SDK was what provided the compiler that generates .swf files. Otherwise, where/how would I even compile AS3?

Assuming that's the case, then my question would be about the suitability of using both MXML and AS3 for (simple) games. Based on what I've read about both, it seemed like the intended use of them was MXML for the interface elements, and AS3 for everything else. Is the overhead that bad for MXML?

View 3 Replies

Flex :: UIComponent Base Class Not Working

Jan 4, 2010

I have a BaseComponentClass that I am using as the class that all my custom components extend.For some reason, none of my custom components show up at runtime. I am not getting any compile or runtime errors either.I am implementing all the protected UIComponent methods.[code]The Button never shows up at runtime.

View 3 Replies

Flex :: Set Property Of NumericStepper Declared As UIComponent

Mar 9, 2010

I have a NumericStepper declared as a UIComponent:

<![CDATA[
private var component:UIComponent;
component = new NumericStepper();
]]>

I need to change the .maximum value of the NumericStepper but due to the UIComponent not having a .maximum property the following code fails with the error: 1119: Access of possibly undefined property maximum through a reference with static type mx.core:UIComponent.

component.maximum = 11;

how would I define a property in this scenario?

View 2 Replies

Flex :: Adding UIComponent To Both Canvas And Tree

Apr 8, 2010

I currently am trying to add a custom class which subclasses UIComponent to both a tree and a canvas, but when I try to re-order the tree by dragging I get this error:[code]When I do not add the UIComponent to the canvas, this error does not occur, anyone have any knowledge as to why this happens?

View 2 Replies

Flex :: Flash - Custom UIComponent Disappearing?

Aug 3, 2010

Extremely frustrated with this. I've created a simple class that extends the UIComponent. I create an instance of this class in a parent class and utilise the 'addChild' method to add it to the parent. I've overridden the 'updateDisplayList' method of the extended UIComponent to add my own drawing routine using the 'graphics' object.

My problem occurs when I start attempt to change any of the following properties (x , y , width, height) either directly or using 'move' or 'setActualSize' because the UIComponent will no longer display - prior to changing any of these properties the object displays fine. I know the object is still there, the 'updateDisplayList' method is still being called (as I'm calling 'invalidateDisplayList' after each change) and it correctly reports the changes.

View 1 Replies

Flex :: Drag And Drop From Datagrid To Uicomponent?

Aug 10, 2010

I'm trying to drag an item from a datagrid and drop it onto a UIComponet. Basically I just want the UIComponent to know that something has been dropped onto it and allow it to access the data of the dropped item.

I thought just listening for the drop event would do it but it seems not.

I found lots of documentation on dragging from one IList to another but nothing for this.

<mx:UIComponent xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="init(event)" dragDrop="itemDropped(event)">

View 1 Replies

Flex :: Make Custom UIComponent Accessible?

Apr 18, 2011

I added a MXML component in flex and selected the base as UIComponent. I want to make it accessible so that automated testing tools can Access it. I am using TestComplete for automated testing. As TestComplete uses Microsoft Accessibility classes. Now it treat my component as the Graphics.

View 3 Replies

Flex :: Correctly Redraw UIComponent By ValidateNow()

Apr 20, 2011

I'm removing an UIComponent but parts of it last being visible. It redraws only when I move mouse around or something. I tried to do validateNow() on its parent, tried to do setTimeout(validateNow, 100) but it doesn't help. When I call it by setTimeout it seems these artifacts shown more rarely but it doesn't solve a problem in all cases. Please guide me someone to read about validateNow(), how it works and how to make these things correctly.

The code is below:

protected var bubble: SpeechBubble;
// creation
bubble = new SpeechBubble();

[Code]....

View 3 Replies

Flash :: Using DrawLine On UIComponent Object In Flex?

May 1, 2011

I've been trying to draw a series of points using a UIComponent using:

var line : UIComponent = new UIComponent();
...
line.graphics.lineTo(renderPoint.x, renderPoint.y);

[Code]....

The problem is that although I have all renderPoint segments etc. The line never gets drawn or it never gets displayed. I think this might be because of some Flex thing that is not so obvious.

View 1 Replies

Flex :: Override A Protected Method From UIComponent?

May 30, 2011

I want to create a custom button in ActionScript. [code]...

View 2 Replies

Flex :: Parent And Owner Property Of UIComponent

Jun 30, 2011

I'm trying to understand the difference between the owner and parent properties of the UIComponent.

<s:Panel id="panOne" title="Success">
<s:Label id="labOne" text="Hello World!!"/>
</s:Panel>

In the above code, labOne.owner.id returns panOne and labOne.parent.id returns contentGroup.

I understand the owner property refers to the parent container of a component (Label in this case). But what does parent property actually mean? I think it relates to some skin concept which has a with id value of contentGroup.

exact difference between these two?

There is another link in the link provided by you. It explained these two terms very clearly. That link is: Gumbo DOM Tree API - Functional and Design Specification

I have pasted below the best lines from that page.

The parent of a visual element is the container directly in charge of laying it out. The owner of a visual element is the component that logically owns it. If a Button is in a SkinnableContainer, its parent is the contentGroup while its owner is the SkinnableContainer.

View 1 Replies







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