ActionScript 2.0 :: Combobox Component - Each Selection With Own Value

Sep 13, 2003

I'm trying to make a simple drop down list where each selection has its own value. I have a combobox with the following parameters.
Editable = false
Labels = choice1, choice2
Data = 0,1
Row Count = 8
Change Handler = blank

I have an instance name of "type" on the component. Now I have a dynamic text field with a var of "price" and on the first frame of my movie I have this code
if (_root.type == 0) {
_root.price = 10;
}
if (_root.type == 1) {
_root.price = 20;
}
But its not showing these values in my text field when I select those choices.

View 11 Replies


Similar Posts:


ActionScript 2.0 :: Combobox & List - Each Selection Triggers The Specific Xml File To Load Into The List Component?

May 10, 2007

I have a combobox and list component on the stage. The combobox has 3 selections. How do I get it so that each selection triggers the specific xml file to load into the list component? I can't get them to communicate to each other.

View 1 Replies

ActionScript 1/2 :: Chapter Selection With A Combobox?

May 27, 2010

I have made a flash player that get the movie from a seperate server. There are also some slideshows that depending on time in the movie chances so the pictures are relevant with what you are watching., this pictures chanses with the from a xml file. I would now also like a Combobox that works as a chapter selecter. I have "made" the combobox and the text that i have in the xml shows up however now i cant get the combobox to work

View 5 Replies

Flex :: 3 - Combobox With Multi Selection

Jun 15, 2010

I have a combobox with multi selection. when i click on add button, which ever data is selected in the Combobox, those data has to be displayed in the another comboBox.

[Code]...

View 1 Replies

ActionScript 2.0 :: Setting Selection Of A Combobox?

May 13, 2008

Is it possible to use AS2 to dynamically set the current state of a ComboBox?I'm loading variables from an external file, and I need the ComboBoxes to reflect the selection that comes in.

View 3 Replies

ActionScript 2.0 :: Combobox Won't Allow Selection Of 1st Item?

Oct 18, 2009

Like the title says I can't seem to get my combobox to allow the first item to be selected after loading.If I select any other item in the list it works fine and I can immediately come back and select the first.Seems like strange behavior but as this is my first project using the combobox I'm hoping it's something I've overlooked or just didn't realize I needed.Here is the code I'm using

Code:
comboBox.getFocus();
// Create Listener Object.

[code]......

View 1 Replies

Flex :: Combobox Selection Inside Datagrid?

Mar 1, 2011

I have a datagrid.In this datagrid I have a combobox item editor. This datagrid also has multiple columns where a user inputs numbers in each column. These numbers are then calculated by formula where the sum is posted in the "total" column. In this combobox there are two options for the user to choose from and each option has a different formula for calculating the inputted numbers. What I want is for when a user chooses "option 1" one formula is used to do the calculation, when "option 2" is chosen by the user then formula two is used to the calculation.Here's an example:

Combobox Option 1 (formula 1) is chosen by user = (Column2 - Column1) x column3 = "total" column
Combobox Option 2 (formula 2) is chosen by user = (Column1 - Column2) x column3 ="total" column

I realize you would use a conditional such as "if else" statement, but im just not sure how to do it. I've been trying to implement this for a while with no success.

View 2 Replies

Flex :: ComboBox Selection Doesn't Recognize

Apr 19, 2011

My code snipet looks like :

[Code]...

Do you have idea about the reason for that error and how to prevent it? N.B. The code that triggers this error is as a result for click handler. If before encountering this error change the selection on my yearsCb, everithing is fine. EDIT: I forget to specify that this error is thrown when it is a selected item in my ComboBox. It seem that after container that holds the ComboBox loses the focus, it doesn't recognize it's ComboBox child as having a selected item anyway (this problem arise only after the modal popup close.).

View 2 Replies

Actionscript 2.0 :: V2 ComboBox Not Showing Current Selection?

May 5, 2008

I am building a website for an online store in Flash 8. I needed to use a dropdown menu for selecting the size of a clothing item, so I just used the default ComboBox component. I thought it was working fine, until I came across a strange bug (with the component, or my own code) where the ComboBox was not showing the current selected item.

The dropdown's list works, and shows all the options, but if you click on one, it doesn't get displayed as the current selection in its TextBox. The weird thing is that it still works fine, and I can access the data ok. If I use myComboBox.text I can access the current selections text, even though Nothing is being displayed.

Has anyone come across this before, and has any suggestions for what I am doing wrong.

A few details: Here is the actual code I am using to load the options into the ComboBox: Code: Select allvar my_cb:ComboBox = this.pages.product.size_comboBox;
my_cb.removeAll();

var sizesList:Object = productData[categoryID][productID]["sizes"];
for(var s in sizesList){
my_cb.addItem({data:s, label:sizesList[s]});
}
my_cb.redraw();

There are a number of other things happening the same time as its adding the items to the comboBox, e.g. loading images, creating movieClips, etc. Could loading this be causing the comboBox to not function properly.

View 2 Replies

ActionScript 3.0 :: Submit Selection From Combobox To Database?

Jul 19, 2010

I have a flash component comboBox which populates elements from an XML file, and I want the selection to be submitted to a MySQL database using PHP.

View 2 Replies

ActionScript 3.0 :: ComboBox Selection To Update A DataGrid?

Nov 6, 2010

I'am trying to create a Flex Application where users can select courses from a combo box based on the department that offers the course. The combo box has an XML variable as its data provider and has the different departments listed. When a user selects the department from the combo box the courses offered for that department should automatically update (show up) in the data grid under their respective columns. What it needs to do is retrieve the XML for the selected department and then set the data provider for the srcgrid accordingly. I am having a lot of trouble with things displaying correctly in the data grid. The course should be under Course ID, course name under Name, etc...

HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[

[Code]....

View 1 Replies

ActionScript 2.0 :: When A Selection Is Made In Combobox 2 A Link Will Appear For A Download?

Dec 5, 2007

We've all been to driver download pages where you select your model from one combobox list and then that choice populates the next combobox of choices and then that combobox choice spawns a link to the driver.Combobox 1 will display a list of 14 items. Each item in that list has a subset of 3-4 items that will appear in combobox 2 once a selection is made. Then when a selection is made in combobox 2 a link will appear for a download

View 1 Replies

ActionScript 3.0 :: Setting ComboBox Default Selection Using Data Field?

Jul 20, 2009

I've got a comboBox with defined data and label fields. On Event.CHANGE I capture the data field. I need the comboBox to default back to the user selection if they should navigate to another screen and then come back. Normally I've got an array of labels that I can use to just lookup the index: comboBox.selectedIndex = labelArray.indexOf(user selection); In this case I don't have labelArray. What I really want to do is something like this (only with real AS, not fake):
 
comboBox.selectedData = storedDataString or, if the data array is accessible: comboBox.selectedIndex = comboBox.data.indexOf(user selection); Is there an easy way to do this, or should I just suck it up and add yet another global label array?

View 2 Replies

Actionscript 3 :: Change Combobox Selection Based On Value In An Object In Flex?

Jun 14, 2010

how do i change the item selected in a combobox selection based on a selection of a datagrid object?

View 2 Replies

ActionScript 2.0 :: Populate A Combobox From A .php File And Return The Values Of The Selection?

Aug 16, 2004

I trying to populate a combobox from a .php file and return the values of the selection. I have the .php set up to where it outputs something like

&artists=anartist,anartist2,anartist3, etc..they have names..I already have the combobox set up to where it displays

anartist
anartist2
anartist3

after you click the dropdown arrow..How would I get it to return a the numerical value for the artist (ex: anartist would be "0" since it is first in the list) and put it into a variable so that when it is selected it could be placed into an eval() function to create a variable such as "albumcover0" to be loaded through a function. I have been reading tutorials for hours to no avail.I want a single function to produce the number from the selected artist and place it into a variable, then go through all of the loadImage(for the "album image") etc functions..they will be functions that I have made already previously and call all of them with the number in the called fuctions (ex: loadImage(0)) where "0" is the number derived from the variable out of the combo box.Ive tried tons of tutorials, I think that it has something to do with me using flash mx 2004, and as2 turned on.

View 9 Replies

Flex :: Flash Builder Show / Hide ComboBox Based Off Selection

Mar 29, 2012

Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.

View 2 Replies

ActionScript 3.0 :: List Component And Selection?

Sep 14, 2011

I'm coding an auto-complete feature to use in flash forms.When you are typing (in a TextInput component) suggestions start popping in a List.If the user than press arrow Down, the focus is set to the list, so far so good.But how can I make the list first item selected as I set the focus?I tried using scrollToIndex(0); but didn't work.The way it is now, you have to press the Down key two times to select the 1st item in the list, one sets the focus, the second works..

View 1 Replies

ActionScript 3.0 :: Make A Default Selection In A List Component?

Feb 27, 2011

I need that when the list appears is shows a selected cell, I tried this but didn´t worked: list.isItemSelected(0)=true;

View 1 Replies

Professional :: Coding Component Buttons To Correspond With Radio Button Selection?

Feb 19, 2010

I have 6 radio buttons spilt into two groups of 3 and one normal button.The first group of radio buttons correspond to colour and the second to texture.My aim is for the user to be able to chose a colour, then chose a texture by use of the radio buttons, click on the normal button named 'create' which loads a corresponding jpg onto another part of the stage according to the colour & texture selection.I am totally stuck on how to code the buttons so this can happen.I'm sure there is an easy (ish) way for this to happen, but i'm no expert and haven't been able to find it or work it out.I've named each radio button individually, grouped the two sets of radio buttons for colour & texture and named the normal button.

View 6 Replies

ActionScript 3.0 :: How To Use Component ComboBox

Nov 24, 2009

My question is, how I use the component combobox? for joining with php.

View 3 Replies

ActionScript 3.0 :: Skinning The ComboBox Component

Jun 3, 2011

I am wanting to use the ComboBox Component in a Mobile App. Thing is the scrollbar is way to small.Is there any way to change the width of the scrollbar on the ComboBox either in code or by skinning it? I tried just adding some width to the scrollbar component by clicking into the component and changing the width,but it did not work correctly.

View 1 Replies

ActionScript 1/2 ::ComboBox Component To Be Empty When Swf Is Run?

Sep 6, 2006

I am using Flash 8.Say I have 3 datas in the ComboBox - "one, two and three". We find that in SWF "one" is seen in the ComboBox even though the user hasn't selected the data from the ComboBox. "one" has become the default selection in the CoomboBox.I want the ComboBox component to be empty when swf is run.But I don't want the empty thing also to be shown when the dropdown is clicked.

View 5 Replies

Set A Combobox Component To Multiline In Flash CS4 Using It?

Dec 23, 2009

Is there a way to set a combobox component to multiline in Flash CS4 using actionscript 3 ?

View 1 Replies

Actionscript 3.0 :: Tween A ComboBox Component?

Oct 6, 2010

i have a combobox on the stage that i'd like to have tween open instead of just appear when you click it. does anyone know how to do this?

View 1 Replies

ActionScript 3.0 :: Masking ComboBox Component?

Mar 26, 2009

I have a problem masking ComboBox component. I am using following code:

Code:
import fl.controls.ComboBox;
var cb:ComboBox = new ComboBox();

[code]........

View 1 Replies

IDE :: French Characters In ComboBox Component?

Aug 26, 2009

I have searched high and low on this one and there are many different answers and suggestions.I am loading my text in via XML. I have made sure that it is UTF8 encoded.For any other dynamic text I would simply embed the characters I need.

So far I can change the colour and the size of the text in the combobox but just can't seem to figure out how to embed the french characters I need in there.I have created my own font and embedded the characters I need into a dynamic text field on the stage. The created font is named "appfont"

[Code]...

View 3 Replies

ActionScript 3.0 :: Firing Event With ComboBox Component

May 21, 2011

I have a simple ComboBox onstage, with 5 options in it. Each one has a textual label, and is assigned a numeral "data" in the Component Inspector (1,2,3,4,5). I'm trying to get the playhead to move to a specific frame, according to which option is selected, and can't make it work. The trace turns out fine, but the playhead stays in place. (The ComboBox is called my_cb).

PHP Code:
var cbListener:Object = new Object();
cbListener.change = function(evt_obj:Object) {
trace("Value changed to: "+evt_obj.target.selectedItem.label);};
my_cb.addEventListener("change", cbListener.change);
cbListener.change = function(evt_obj:Object) {
var itemName:Number = new Number();
itemName = evt_obj.target.selectedItem.data;
if(itemName == 1) { gotoAndStop(10);}

View 2 Replies

ActionScript 3.0 :: Add Results To ComboBox Or List Component?

Apr 29, 2009

I am working on a quiz application for a client. I currently have an array that as the user goes from one question to another, it holds the question number if the user answers the question incorrectly. At the end I have the results of the array displayed on a dynamic text field.I was wondering if there is a way to display the contents of the array at the end on a comboBox  or list component. And, is there a way to make the items on the comboBox or list component be clickable so that the user could navigate to a different place on the project (like the section that explains how to answer the question correctly).Right now i have the array being created at the beggining:var questionsArray:Array = new Array();I have acommand so that if the question is wrong, add the number of the quesiton to the array:questionsArray.push(" #1");and I display the results of the array at the end:

View 12 Replies

ActionScript 3.0 :: Using HTML Tag In XML To Populate ComboBox Component

Feb 24, 2011

I've actaully got all of this working.All I need now is to make the comboBox text HTMLtext so that I can use the HTML tags to color the text different colors or bold them.It might be important to mention that I need to change only some of the things listed, not the entire list.  So if my list on the comboBox is "item 1", "item 2", "item 3", "item 4", I only want "item 1" in bold and colored red.

View 1 Replies

Actionscript 3 :: ComboBox Component In Flash - Height Changes From 101 To 104?

Sep 6, 2010

When I add a ComboBox component into a Sprite, the height of the container is larger than it should.Here's what I mean:

import fl.controls.ComboBox;
//add combo box inside a container sprite
var combo:ComboBox = new ComboBox();[code]..........

the height changes from 101 to 104.

UPDATE:I've overwritten the configUI method in a ComboBox subclass, but the measurements are correct all the time. Why does the container height change to 100 ?

View 5 Replies







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