Flex :: Actionscript 3 - Extend A Flex Component That Is Not A Container (RadioButton, For Example)?

Jul 21, 2009

I want to extend the RadioButton component in Flex 3, adding a text input line to it in place of the label. Is it possible to do this?Alternately, is it possible to have a container -- such as an HBox -- delegate all properties to an internal component -- such as a RadioButton -- so that I could create a composite component that 'acts like' a radio button?

View 1 Replies


Similar Posts:


Flex :: Make A Custom Component Or Extend The List Component For A 2D Top Down View MAP ?

Nov 11, 2010

I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?

or

I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.

UPDATE: *There will be not any object over another.

*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.

Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?

View 1 Replies

Flex :: Extend A List To Add An UI Component?

Mar 2, 2011

How can I extend a spark list to add a UI component on it?

View 1 Replies

Flex :: What Component To Extend For Drawing Application

Jul 28, 2009

I wonder which component to extend in Flex 3 in order to make a drawing stage.

View 1 Replies

Flex :: What OpenSource Container Component Should Use

Jun 18, 2009

Please help me what container component I will use. Here is my problem, I have advance data grid with full of data about 300 by 300 row-column(data can be picture). Now I need a container that can zoom in/out, fit to screen capability and can drag around the component inside so that my data grid will be zoomable and dragable around the container(Easy for the user to read content inside my datagrid).

View 3 Replies

Flex :: Dynamically Add Component In Container

Mar 18, 2011

I want to dynamically add component in Container like Canvas(TileList constraints each child has the same size, GridList is poor in performance), for example

[Code]...

when I click the button, I hope add a component(whatever the component is, and maybe each component has different size), and if the total width of all added child is greater than myHolder, I hope the new child can begin in new line, and stretch the height of myHolder at the same time.(layout with custom code is better)

View 2 Replies

Flex :: Extend SWFLoader Component To "fit" Any Sized Image Inside It?

Feb 21, 2010

SWFLoader's scaleContent is not able to do what I'm trying to achieve:

<mx:SWFLoader id="img" width="600" height="400" scaleContent="true"/>

When an image of size 100x80 is loaded inside it, the image does does not resize to 600x400. That's because scaleContent = true.

Then, I set maintainAspectRatio = true. The image did resize to 600x400 but obviously, it was totally out of proportion.

So how do I always fit any sized image to the current size of the SWFLoader while maintaining the aspect Ratio? The resized image may be cropped, which is ok.

SCENARIO: An image of size 1500x10 is loaded inside the above SWFloader. In this case the height(10) should be resized to 400 and the width(1500) should automatically resize depending on the height. A lot of the image will be cropped, which is fine.

View 1 Replies

Flex :: Flash - Which Container Is Mostly Used For Load New Custom Component

Jul 28, 2009

In AIR application i have link button like winner statistics . if i like this button then show winner statistics (canves) reports full page on my application . I Already created winner statistics using canves component .Which container is mostly used for view data ?
Please refer me ? i tried viewstack but it will overwrite Main page ?

View 1 Replies

Flex :: Forcing A Child Component To Resize Itself Larger Than Its Container?

Mar 29, 2010

I am creating a component that displays a variable amount of "gauges" (square tiles of content if you will), that is laid out like so:

<HDividedBox id="container">
<VBox id="myComponent">
<HBox id="header">

[code]...

View 1 Replies

Flex :: Add Radiobutton Child To VBox?

Feb 2, 2010

I am having troubles adding a radiobutton to a VBox in actionscript.

var radioButton:RadioButton = new RadioButton();
radioButton.groupName = "source";
radioButton.label = "label";

[Code].....

I first created these radiobuttons in mxml and it worked fine, but now that the radiobuttons need to be dynamically generated in actionscript it doesnt work.

When stepping through in the debugger I get to a binding error (1009) when trying to execute the addchild statement and nothing shows up in the VBox.

View 1 Replies

Flex :: Increase The Size Of RadioButton?

Feb 25, 2010

Recently i worked in a project where i used 5 radio button to select a page number. Now the clients wants a big radio button. how can i increase the size of radio button in flex?

View 1 Replies

Flex :: Show A Warning Before A Radiobutton Changes?

Aug 30, 2010

In my flex app I have some radio buttons. When a user clicks the radio button, I want to popup an Alert, and if the user clicks ok the radio button will change, otherwise their change will be discarded.

How do I accomplish that? I tried event.preventDefault(); while handling the click event, but that didn't do anything.

View 3 Replies

Flex :: RadioButton In Custom DataGridColumn ItemRenderer In AS3

Apr 30, 2010

I have a datagrid that I want to add a column of radio button using AS3 (instead of mxml). I was able to do this with a custom itemRenderer.
var dgc:DataGridColumn = new DataGridColumn();
dgc.itemRenderer = new ClassFactory(com.mypackage.RadioBtnColumnItemRenderer);

In my RadioBtnColumnItemRenderer.mxml, I have a box with a radioButton... like so:
<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="[URL]" horizontalAlign="center" verticalAlign="middle">
<mx:RadioButton id="btnRadio" groupName="btnRadioSelect"/>
</mx:Box>

When I run the application, the radio button shows up in the column as it should. However, I cannot select just ONE of the radio buttons. I am able to select all of them, but I don't want this... I want the ability to select one and then if I select another one, then the first one is unselected and the current one becomes selected (just like you would expect radio buttons to work).

View 2 Replies

Flex :: Prevent Container In ItemRenderer From Exceeding Width Of List Container?

Jul 2, 2011

In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.

If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.

Anyway so, at the top of my itemRenderer I tried specifying:

<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">

And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.

<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">

[Code]....

View 1 Replies

ActionScript3 :: Flex : Programmatically Associate A RadioButton With A RadioButtonGroup?

Jul 27, 2009

I have a UI component that, for various reasons, I have to construct programatically. The component is a table of radio buttons grouped by column.Right now, I'm constructing the column groups like so:

private function createGroupsForItemList(items: XMLList): void {
for each (var item: XML in items) {
var rbGroup: RadioButtonGroup = new RadioButtonGroup();
groups[item.@level.toString()] = rbGroup;
}
}

I'm trying to associate the RadioButton instances with the column groups like so:

private function createValueControl(item: XML): UIComponent {
var control: RadioButton = new RadioButton();
control.label = "";

[code]...

I can see in the debugger that the control has an association to the group:

control.group == groups[item.@level.toString()]

However, I can see equally that the group does not know anything about the control:

group.radioButtons.length == 0

I imagine that this is because the setter for group in RadioButton is a dumb setter; all it does is copy to the variable, which doesn't do the magic that groupName does. However, I can't seem to find the value I should use to set the RadioButton.groupName property correctly.So, in short, I'm stumped on how to get these bits to talk to each other. How do I do this?

-- EDIT -- It turns out that I can have the groups created and associated simply by setting the groupName property, but I can't get at the group to set up a selection listener; the group is NULL immediately after the setting process, which means that the second line below throws the Flex equivalent of an NPE:

control.groupName = groupNameForLevel(item);
control.group.addEventListener(Event.SELECT, updateSelection);

View 2 Replies

Flex :: 3 - AdvanceDatagrid With Radiobutton - Change The Radio Selected Value

Jul 23, 2010

I am using Advanced DataGrid of Flex 3 with hierarchical data and also i added tile list as a item renderer in another column in that tile list i added radiobutton as item renderer if i change the radio selected value the hierarchical tree sould expand if the scroll bar will come the radio button value is changing

[Code]...

View 1 Replies

Flex :: Make Rights Symbol In A RadioButton Label?

Dec 1, 2010

I've got a Flex 3 site. I need to put the rights symbol, ®, in the radioButton's labels:

<mx:RadioButtonGroup id="myButtonGroup" itemClick="goClickHandler(event);"/>
<mx:RadioButton groupName="myButtonGroup" label="{answerA}" value="{answerA}"/>
<mx:RadioButton groupName="myButtonGroup" label="{answerB}" value="{answerB}"/>

I've got the label and value bound to:

[Bindable]
public var answerA:String;
[Bindable]
public var answerB:String;

I pull answerA and answerB from a database.

I guess that I need to use htmlText somehow.

View 1 Replies

Flash :: Change Flex 4 Radiobutton Selected FontWeight?

May 2, 2011

I have been searching around for a while now, and cant find anything. In Flex, I need to be able to change the fontWeight of a RadioButton that is selected to bold. So, when a RadioButton is selected, it would call a function in AS3 that would set the fontWeight of that selected RadioButton...

valveRadioGroup.addEventListener(Event.CHANGE, changeRadioHandler);
private function changeRadioHandler(event:Event):void {
//change this RadioButton's fontWeight to bold

[code]....

View 1 Replies

Flex :: Dynamically Adding Container To A Dynamic Container

Sep 21, 2011

I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way is to create a new panel (panel creates fine) and then add collapsable panels(nested) to that panel. Here is the code from the else loop.

else if (newPanel == false){
// simpleData is just for the title bar of the new panel
// otherwise the panel has no content

[Code]....

The error I get is: ReferenceError: Error #1069: Property panel4.4 not found on components.readTest and there is no default value.

I have tried setting the "name" property instead of the "id" property.

View 1 Replies

Flash :: Flex - Dynamic Radiobutton In Builder 4.6 - Make It Multiline?

Jan 10, 2012

I am making a quiz application for mobile.The questions are comming from xml. How can i make multiline Radiobuttons? I tried to do a skinclass but it didn't worked.In this code i make the RadioButtons.

[Code].....

View 1 Replies

Flash :: Potential Bug With The RadioButton Component?

Sep 6, 2011

I've got a weird issue with the RadioButton(fl.controls) when I add it to the stage.Here's a quick way to reproduce the issue:create an empty MovieClipadd a RadioButton componentset the width of the component to a value smaller than 100trace the container width The container width will trace 100 even though the RadioButton instance on stage is less than 100 wide.If I add the component from code, it works if I invalidate the stage after adding the RadioButton first, then check the container width in a Event.RENDER handler.

View 1 Replies

Flex - Hide Container Of A Viewstack Container?

Dec 23, 2010

I have a viewstack container w/ 3 views: red, black, and blue. How can I completely hide the black & not include it?

[Code]...

View 2 Replies

Flex :: Drag Circle From One Container To Another Container?

Jan 13, 2012

I am creating an flex Air project,so mxml file will run. I have circles in one Big circle at one side and will be same on other side.

Now how to drag any circle from any Big circle to other side. Or it could be like any two container having circles, then how to drag and drop circle?

For one circle i am able to do drag and drop.But I want one Big circle on left hand side and one big circle on right hand side .And small circles with class names will be in these big circles.Now i want to drag and drop those small circles in big circles.Big cicles should not move. Even i have tried this code in actionscript

package
{
import flash.display.Sprite;
import flash.events.MouseEvent;

[Code].....

But in this i want big circles should not move and small circles should only be dragged.

View 1 Replies

Flex :: Extend ObjectProxy Class?

Feb 8, 2010

I trying to extends ObjectProxy class, the reason is because I want to have a Singleton of the ObjectProxy class, so I made something like

package utils
{
import mx.utils.ObjectProxy;[code]........

when I create my object uniform which is a simple object, I pass it to my UniformObjectProxy.getInstance() static method to get the instance of my objectProxy, ok so far so good.my problem is when I try to bind a property of my objectProxy instance like

_opc = UniformObjectProxy.getInstance(_uniform);
cw:ChangeWatcher = BindingUtils.bindSetter(dispatchColorChange, _opc, data.id);

the dispatchColorChange handler function is called only once an never again, I had check ChangeWatcher.isWatching() and return false meaning my objectProxy is not binding properly, if I create an objectProxy like

_opc = new ObjectProxy(_uniform);
cw:ChangeWatcher = BindingUtils.bindSetter(dispatchColorChange, _opc, data.id);

the binds works just fine, so my thinking is the problem is when I extends the objectProxy class, how is the proper way to do this

View 1 Replies

Professional :: RadioButton Component - How To Remove HitArea

Jul 30, 2010

Flash CS4
AS2
RadioButton Component

I want to remove the so called "HitBox/HitArea" on the RadioButton component - I don't want the user to be able to click anywhere else except the button - and I don't want to just resize the hit area so it's as big as the button (the hit area is a square, and my button is a circle)... can this be done? or does the button absolutely depend on hit area? Part of my reason for asking this, is when I publish my .swf with the radiobutton - the hitarea is displaying as a big white rectangle that is covering the button and part of the text up... why is this?

View 3 Replies

Flex :: Extend A Panel To Allow CornerRadius Per Corner?

Apr 27, 2010

It looks like the "cornerRadius" property of a Panel only changes the top corners and bottom if using a ControlBar. I'd like to specify a corner radius for each of the corners individual.

I know Degrafa can do this but I'd like to avoid if possible.

View 1 Replies

Actionscript 3 ::- Extend From Number Class In Flex?

Jul 8, 2010

I need a way to "extend" or proxy the Number class in ActionScript.Basically I'll overload the toString method of it. But the Numbers should remain comparable with "<" and ">" operators.

View 2 Replies

Flex :: Datagrid - Unable To Extend DataGridColumn?

Oct 1, 2010

I am unable to compile the following Flex application.All I am trying to do is, to extend DataGridColumn class.I get the following compile error :

Could not resolve to a component implementation.
DataGridColumnTest/src DataGridColumnTest.mxml line 6
DataGridColumnTest.mxml :

[code]........

View 1 Replies

Flex :: Class To Extend An ArrayList Of Objects?

Jul 22, 2011

It is possible for a class to extend an arrayList of objects in Flex?

[Code]....

View 1 Replies

Flex :: Extend A LinkButton To Allow HTML Text?

May 26, 2009

I am feeding the label to my LinkButton directly from a string I receive from a Google API that puts html to format the label.

I want to extend linkbutton to allow this. I wrote a class myself to allow html text for the label and that aspect of it works but now the background that appears when you hover is way too big. I tried to override measure() to fix this but I didn't have a clue how. Here is the class I wrote:

package com.kranichs.components
{
import mx.controls.LinkButton;
public class HTMLLinkButton extends LinkButton

[Code].....

View 1 Replies







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