Flash :: Get The Value Of RadioButton Inside A FormItem?

May 13, 2010

I'm working on Flash Builder with latest flex SDK. I have a problem getting the value radioButton of the selceted radio button inside a form:

<mx:Form id="form_new_contribution">
<mx:FormItem label="Contribution type" includeIn="project_contributions">
<mx:RadioButtonGroup id="myG" enabled="true" />
<mx:RadioButton id="subtitle" label="subtitle" groupName="{myG}" value="subtitle"/>
<mx:RadioButton id="note" label="notes / chapters" groupName="{myG}" value="note"/>
</mx:FormItem>

[Code]...

View 2 Replies


Similar Posts:


Flex :: Whats Different Between S:FormItem And Mx:FormItem

Dec 23, 2011

When i use the the Form and FormItem in flex,I found the s:FormItem can't place its label position automatically and can't use direction, horizentalGap properties, but adobe recommended us to use spark.components.FormItem instead of mx.containers。FormItem,so can you teel me the different about these two class,and tell me why the properties such as direction, horizentalGap can't use in spark.components.FormItem.

View 1 Replies

Actionscript 3 :: Flash Radiobutton: Get The Selected Radiobutton?

Apr 3, 2011

I have a few radiobuttons I drag and drop within same group. In main.as I added click event listener.

How do I get the selected radiobutton ? handler target argument doesn't contain any reference to it.

View 1 Replies

ActionScript 3.0 :: Assign A Value To A Radiobutton And Trace Out When Radiobutton Is Clicked?

Feb 18, 2009

How do I assign a value to a radiobutton when it's in a for loop to then trace out the value when radiobutton is clicked? I got this now, but it just sets all the radiobutton values to 10..

View 8 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

Actionscript 3 :: Attach An Error To A FormItem (not ErrorString)?

Apr 5, 2012

I would like to attach an error to a formItem. In spark, it appears that the standard way it is rendering on error on validation of a textInput, is bordering the textInput with red, placing a yellow alert icon next to the textInput and placing the error message in the formItem aligned to the right. How does one do this manually for a custom formItem invalidation so that I can conform to error display?

View 1 Replies

Flex :: FormItem Layout In Nested Component

Jul 20, 2011

I have a fairly straightforward Flex layout question. Is there anyway to get FormItem's contained within a nested container to follow the alignment of the FormItem's in in the parent form container?

[Code]....

View 1 Replies

ActionScript 3 :: Flex 4.6 - Spark FormItem Inner Gap Cannot Be Removed?

Feb 14, 2012

Working with Flex 4.6 spark forms, I encountered strange behaviour: FormItem element ALWAYS has inner gap (padding), which cannot be removed. Red area on image ilustrates the unwanted GAP that i cannot manage to get rid of. Blue border represents Form component. Grey border (thin) represents FormItem component. FormItem has no padding or gap property.

This is the code for image above:
<s:Form id="form">
<s:layout>
<s:FormLayout gap="0"
paddingBottom="50"
paddingTop="0"/>
</s:layout>
<s:FormItem width="100%" label="RC">
<s:TextInput id="myTextInput" width="215"/>
</s:FormItem></s:Form>

When developing for mobile, you want to make best use of every pixel on your screen. This is unacceptable for me since I want to have several TextInput fields and having this gap will waste lots of space... So my question is, can the red GAP be removed? I want my FormItem to have padding 0 - meaning TextInput border will touch FormItem border...

View 1 Replies

Actionscript 3 :: Flash Cannot Compare Radiobutton Label To A String?

Apr 3, 2011

Why first trace prints out not second one whereas I set label in property panel to "hello"?

public function OnClick(event:MouseEvent) {
trace(event.target.label.toString());
if (event.target.label.toString() == "hello") {

[code].....

View 2 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 :: Binding Sum Of Column Of A Datagrid To A Formitem's Text?

Apr 21, 2011

I want to bind sum of a column of a datagrid to a FormItem'text which is shown below of that datagrid.

View 1 Replies

Flex :: Mx:formitem Multiple Labels - Add A Second Label To A Text Box?

Nov 21, 2011

I'm a new to Flex, and I'm trying to add a second label to a text box.

like this: Label [_______] label 2

So the first label will describe the text box and the second the unit, for example:

cost of cleaning [_______] $ per hour

Can I do this with a label inside the form item?

what I have tried looks like this:

mx:FormItem label="cost of cleaning">
<mx:TextInput id="proSRO2YO" text="" width="120" maxChars="20"/>
<mx:Label text="dollars per hour"/>
</mx:FormItem>

but that results in a second label one line below, I need these on the same line.

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

Flex :: Build A FormItem With An Image Button In The Label Section?

Jul 30, 2010

I want to build a flex FormItem extension that adds a button into the item label section, such that there is both a text label and, to the right of it, a button that uses an image icon: Basically, I want to create that 'i' icon, such that I can click on it to display a help overlay for the item in question.Is there an existing component that does this? If not, how do I do it?

View 1 Replies

Actionscript 3 :: Dynamically Added FormItem Doesn't Show Error Text

Mar 29, 2012

I am dynamically creating a form on runtime of my application. The content of my form item (lets call it MyFormItemContent) looks like this (simplified):

<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
width="100%" borderAlpha="0.0">

[code]...

If the validation of MyValidator has errors a red frame apears around the BorderContainer as intended. But unfortunatly the error text that should apear right to the form item doesn't. I'm thinkin it's a layout problem because I define the validator inside the form item content before adding it to the form. I've already debugged this and read documentations a lot.

View 1 Replies

Create A Simple Radiobutton?

Nov 17, 2009

I want to have 4 radio buttons Then which ever radiobutton the user has chosen I want Flash to use it later on.

[URL]

however I receive the following errors why?

**Error** Scene=Scene 1, layer=action, frame=1:Line 4: The class or interface 'fl.controls.RadioButtonGroup' could not be loaded.
var myradioGroup:RadioButtonGroup=new RadioButtonGroup("Group 1");
**Error** Scene=Scene 1, layer=action, frame=1:Line 13: The class or interface 'MouseEvent' could not be loaded.
function showResult(event:MouseEvent):void {
Total ActionScript Errors: 2 Reported Errors: 2

View 10 Replies

ActionScript 3.0 :: Any Way To Disable RadioButton?

Jan 4, 2010

i was wondering if there is a way to disable radio button selection after a choice has been made?I tried radioButtonGroup.selected = false, didnt work, nor did radioButtonGroup.enabled = false.For example, when i initialize my radiobuttongroup in the setup.enabled radio button in the setup, so user can select choice.radiobuttongroup.enabled = true.After which, i have a checkAnswer button to check that regardless of choice radiobutton group.enabled = false. that way, the user will not be able to choose choice 1, after which, blah, i am going to choose choice 2/3/4/5/...Or is it, tough luck bum, if u want to do it that way, comboBox/the other button are the only way to go?

View 3 Replies

ActionScript 3.0 :: Changing The Skin Of Radiobutton?

Jan 23, 2009

I want to change the skin of a radiobutton with images which are called dynamically. I know how to modify radiobutton's sking but I want to call particular images for over, selected icons. Can it be possible in Actionscript 3?

View 1 Replies

ActionScript 3.0 :: Creating Group For RadioButton?

Jan 15, 2010

I have a code:

import fl.controls.RadioButtonGroup;
rb1.label="C++";
rb2.label="ActionScript 3.0";

[Code]......

View 3 Replies

ActionScript 1/2 :: Set The TabIndex For The RadioButton Of A Same Group?

Oct 11, 2011

how to set the tabIndex for the RadioButton of a same group.

View 5 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

ActionScript 3.0 :: How To Declare New RadioButton Object

Aug 18, 2010

I'm trying to convert a number of Flash activities that I wrote in AS2 and re-write them in AS3. I've managed to convert one that is a simple question/answer activity that uses the radio button components from Flash CS5.The problem is, the project looks and functions fine from within Flash (no compiler errors), but if I open it as a standalone swf, it's clear that Flash Player doesn't like something in my code (the radio buttons and all other button instances start flashing and appear skewed). I'll copy/paste my code below if anyone cares to read it. I would narrow in on the offending code, but I really don't know where that is...

ActionScript Code:
// ------------------- check answer function
function checkAnswerBtn_listener(eventObject:MouseEvent) {

[code].....

View 0 Replies

ActionScript 2.0 :: Unchecking Radiobutton If Another Is Selected

Mar 25, 2004

I am using the FFP Lightweight components set tickbox (this component is available at flashcomponents.net)I want to put script in each tickbox to uncheck the other box next it if it gets chosen (so a user can't select yes and no)I also want to add or subtract a value from a variable.[code]

View 1 Replies

ActionScript 2.0 :: Passing Radiobutton Values To PHP?

Nov 17, 2005

I have a movie clip called form with 3 input boxes in it, I then pass these variables to a PHP page that emails them out to a specific email address, all well and good and this works fine.

However, I need to add a yes/no query to the form using radiobuttons, what I can't figure out is how to actually grab the variable for the radiobutton in the PHP, I had originally believed that the variable would just be the groupname of the radiobuttons however this doesn't work.

I suspect the radiobuttons variable isn't actually being passed to the script at all

For the record I'm using MX2004, AS2.0 and the submitting code on my submit button is:

on (release) {
form.loadVariables("/testarea51/email.php", "POST");
}

View 1 Replies

ActionScript 3.0 :: Fl.controls.RadioButton Width 100?

Oct 19, 2007

I'm trying to use the RadioButton in a narrow component and position it programmatically,

however the size of the Sprite that contains the is always at least 100 wide

I'm using the fl.controls.RadioButton class

[Code]...

View 1 Replies

ActionScript 3.0 :: Finding The Radiobutton Width?

Sep 9, 2009

I'm creating a form in flash where the radiobuttons line up horizontally (i'm not in control of design). But i cannot get an accurate width on the radiobuttons. For some reason every time i check for a width it's 100 pixels. Upon adding the button the textField doesn't have an accurate width either, so i can't even go by it.

I created a change event, and when i trace the textfield width and x position they are correct, but i need to be able to correctly place these objects upon creation.

View 2 Replies

ActionScript 3.0 :: How To Reset / Deselect RadioButton

Oct 9, 2009

- Got 3 radio buttons on stage.
- Need a way to reset all 3 after a check (it's a quiz)
It seems it isn't possible.. Is there a way instead?

View 2 Replies

ActionScript 2.0 :: Unchecking Radiobutton If Another Is Selected?

Mar 25, 2004

I am using the FFP Lightweight components set tickbox (this component is available at flashcomponents.net)for YES and NO questions....I want to put script in each tickbox to uncheck the other box next it if it gets chosen (so a user can't select yes and noI also want to add or subtract a value from a variable...heres a sample of what i put on each tickbox instance... the syntax is definitely wrong:

on(release){
value = n14.getValue()
if value = (true)

[code].......

View 1 Replies







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