ActionScript 2.0 :: ComboBox Value Concatenating Instead Of Adding?
Jun 6, 2008
I'm trying the add the data value of a selected combo box item (.35) to 1 using:
var theFringe:Number = _root.calc.fringe.getValue();
_root.calc.fFringe.text = theFringe+1;
Returns: .351
Is there a way to convert the data from the comboBox to an integer so that when I add .35 +1 I'll get 1.35?
View 1 Replies
Similar Posts:
Apr 24, 2010
Code:
if (my_CheckBox.selected == true) {
My_ComboBox.addItem({data:01, label:"My_Label"});
Problem is this add that item unlimited time. How can i add it only one time?
View 2 Replies
Jun 30, 2011
I've created a flash builder actionscript 3 project which loads an external swf which was created in flash cs5 which contains the combobox component.How do i dynamically add items to it?
mc1['itemList'].addItem({label:"test"});
View 1 Replies
Oct 24, 2011
I need to use both components in an AS3 project, so I'm trying to put them both in the library. When I add ComboBox on top of ColorPicker, I get a library conflict. If I choose to replace items, the ComboBox works but ColorPicker starts producing errors, if I choose to use the existing items, the ComboBox doesn't work.
View 1 Replies
Mar 28, 2010
I'm using Flash Pro CS4, and ActionScript 2, and I'm trying to create objects dynamically, through code, rather than through the designer in Flash.
[Code]...
View 4 Replies
Sep 30, 2009
I have the following function which returns a string: cues.getCurrentCue(); returns: "Definition_1" Definition_1 is the class name of a movie clip. I would now like to do something like this:
var currentDev:String = "new " + cues.getCurrentCue() + "()";
def_mc = currentDev;
addChild(def_mc);
But I get the following error: 1180: Call to a possibly undefined method currentDev.
View 1 Replies
Jul 14, 2005
It's another simple problem that has me stumped.
x = 1;
y = 2;
z = 3;
[code]....
View 7 Replies
Oct 10, 2011
I need to get an XML node by using this syntax:
[pseudo code]
xml.node["subnode"].@string.children();
[real code where _xml is XML]
_xmlList:XMLList = _xml.cases["case"][@id == event.target._id].files.children();
And yes, case is a reserved word - therefore the brackets and quotes.
event.target._id is a string, but I can't seem to figure out how to concatenate the @ (at sign) with a string to get the attribute (or the node that corresponds to the attribute).
I've tried _xml.cases["case"].(@id == event.target._id).files.children();
But it doesn't work. How am I totally off in the wrong direction?
View 1 Replies
Apr 8, 2010
I have three text boxes on the stage id=red, blue, green same as the keys in my
cars Object/Array
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code]....
So I'm thinking "tempObj.text" would equal red.text but I can't stick "tempObj" with ".text" is there a way this can be done?
View 1 Replies
Jan 6, 2011
I have an external interface call which I need to pass several values to. Each value has an indentifier string and the value itself.
Code: ExternalInterface.call("submitIUR", answers +"promo", promo+ "url", nextUrl); The problem is that when I pass this through to the javascript function, flash concatenates the identifier strings. So for example if promo is 12345 when passed through the "url" indentifier gets tacked on the end so I get 12345url.
Is there an easy way to separate out the variables being passed through to stop the strings being tacked on to the variables?
View 6 Replies
Dec 1, 2009
I'm writing a menu generating script. It's suppose to display arrays
and any inner arrays.
Ex:["test item",["item 1",["item 2","item 3"]],"item 4"];
These movie clips should be displayed if the actionscript is correct.:
test item
item 1 <---this of course, has a following subarray
item 4
and the submenu should display:
item 2
item 3
I run the script and it see's the inner array items ["item 2", "item 3"] and shows them in the next submenu -FINE---but what I get in the main menu to my surprise is 'run-on text' in the Dynamic field of that movieclip. ex:
test item
item 1; item 2; item 3 <---? seems to concatonate inner items in text field
item 4
I only want to see text "item 1" ....not the items associated with it as well.
(they are already displayed in submenu)
Code:
for (var i = 0; i < menuArray.length; i++) {
var menuItemName = "mc_menu_item_" + i;
if (typeof(menuArray[i]) == "object") {
this["mc_menu_box"].attachMovie("h_menu_middle_sub", menuItemName, tempLevel);
View 2 Replies
Jul 24, 2009
I�m calling a ColdFusion page that generates output in the form of a text file to be used in a scrolling dynamic text field.So, Instead of calling a text file like so:
//calls a static text file
loadText.load("StaticTextFile.txt");
Im calling a ColdFusion page like so:
[code].....
View 1 Replies
Mar 29, 2005
has anyone had any problems with addition? I'm trying to get two numbers to add and instead it is concatenating them together as a string, however when I multiply, divide, or even subtract them it works fine.
View 10 Replies
Dec 29, 2010
I am working in flex builder 3 with an XMLListCollection and have run into this (should be simple) parsing snag...The XMLListCollection Data:
<data>
<term name="NUMBERS">
<alt_form name="1"/>
[code]......
View 3 Replies
Jan 2, 2011
I have a video player that plays videos loaded via XML and selected using a combbox. I just got the play and pause buttons to work. What I'm attempting to do now is be able to hit next or previous buttons and select the next or pevious video from the XML file, and update the displayed/selected file in the combobox, my thought was to somehow set the previous/next buttons to directly manipulate the combobox, but nothing I've tried so far has worked.
ActionScript Code:
import fl.data.DataProvider;
var nc:NetConnection = new NetConnection();
nc.connect(null);
[code]....
View 2 Replies
Oct 2, 2009
A snippet of my code is [code]The first element in the mainOptions Array is linked (metaphorically) to tab1.The second element in the mainOptions Array is linked (metaphorically) to tab 2 and so on.I want to create 12 variables named AudioMP3, AudioHEAAC, NewsBBC, NewsTwitter, VideoVideo and so on down to PicsPics2. i.e concatenate each entry in say tab1 through 5 to the each element from mainOptionsArray and make a new variable using that name then assigning a number to this variable.[code]
View 1 Replies
Aug 7, 2009
I'm using Flash CS3 and want to create a custom ComboBox. I've followed the steps outlined in "Editing component skins in a new document" (http:/[url]...), but every time I get to the step where I drag the ComboBox Assets folder from the HaloTheme.fla library into my library, if I test movie at that point my combobox has become an unclickable white rectangle with no label, button or anything.
View 2 Replies
Nov 8, 2010
I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..
I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.
View 1 Replies
Mar 16, 2011
How can I validate there's a selected item in a ComboBox before saving? If there's no selected item, how can I set focus on the ComboBox?
View 2 Replies
Dec 8, 2008
**Warning** The linkage identifier 'ComboBox' was already assigned to the symbol 'ComboBox', and cannot be assigned to the symbol 'GUI MC/Combo Boxes/abc', since linkage identifiers must be unique.**Warning** The linkage identifier 'ComboBox' was already assigned to the symbol 'ComboBox', and cannot be assigned to the symbol 'GUI MC/Combo Boxes/def', since linkage identifiers must be unique.
Both of my ComboBoxes has the same identifier.I could not change the identifier through the properties tab because it is greyed out.
View 5 Replies
Jun 12, 2009
I'm having trouble getting the following to work:
I have declared an array "playlistArray" which will hold a series of track names (for an mp3 player.)I have declared a URLVariable "playlistVariables" which loads the data from an external text file.If I brute-force assign values from playlistVariables to playlistArray, everything works fine:
playlistArray[0] = playlistVariables.track0;
If I test this with trace(playlistArray[0]) I get the track name I am looking for. But obviously I don't want to brute-force assign all those values, I want to use a "for" loop:
for (var i:int = 0; i<maxTracks; i++) {
playlistArray[i] = ["playlistVariables.track"+(i)];
trace(playlistArray[i]);
When I do this,I end up with playlistArray[0] containing the string "playlistVariables. track0" rather than the value of playlistVariables.track0.
View 3 Replies
Nov 24, 2011
The name of my DocumentClass is Main. So, what's the difference between :
var myClass:Main = new Main();
var mcInLibrary:MovieClip ;
/////////////////////////////////////////[code]............
View 1 Replies
Jan 11, 2007
I've stumbled across a very interesting tutorialBut, I've noticed a little detail. When you click on the big image of the finished example on the first page of tutorial, it acts like a link. When I have downloaded finished .fla source, links are nicely written in the images.xml file, but the links in the .fla file don't work.
View 2 Replies
Apr 29, 2011
I can use this to trace the new combobox value every time the user changes it:
Actionscript Code:
// Create listener object.var cbListener:Object = new Object();// Create event handler function.cbListener.change = function (evt_obj:Object) { trace("Currently selected item is: " + evt_obj.target.selectedItem.label);}// Add event listener.my_cb.addEventListener("change", cbListener);
But that doesn't do anything when I select the same value. This is what I want it to do: when using the combobox some textfields should fill itself with some default values belonging to that label. Then the user can change those values if desired. When the user then chooses another combobox label the fields get filled with the default values of that label again. But when the user chooses the label previously set, the textfields don't get refilled, cause the listener object only reacts when the label value has been changed, not when the label value is the same as previously chosen. Is there a way to make it react upon chosing any label? Not just others, but every label?
View 1 Replies
Jul 15, 2007
I have a booking form with some combobox's that's placed within a MC. My issue is that the combobox data isn't showing. When you click the drop down you can see the data, but when it's closed it doesn't show.
Here are the fla & swf files so you can see what I'm talking about...
[URL]
View 6 Replies
Aug 23, 2009
I have a main SWF that loads an external SWF with addChild. the external SWF loads fine but when i click the combobox in the external SWF I get 2 errors:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at fl.controls::ComboBox/close()
[code].....
View 5 Replies
Aug 26, 2009
I have made a placed a combobox called 'genreselect' on the stage and I am trying to output genreselect.value to a dynamic textbox called 'output' but I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::ComboBox/get value()
at cataloguemenu_fla::MainTimeline/cataloguemenu_fla::frame1()
[code].....
View 5 Replies
Nov 30, 2007
How do I get the data from a combobox?
View 11 Replies
Feb 6, 2010
is it possible to put an MC in a row of a ComboBox? How should I go about doing this? I was going to copy the .as file(s) for the comboBox/cellRenderer components and alter them, but after looking at a few, I'm not sure which ones would be best to work with.
View 3 Replies
Nov 19, 2010
im trying to have the loader load a new url specified in dataprovider. i get "could not convert" error or "element is malformed".
Actionscript Code:
function onLoaded_2(e:Event):void{xml_2 = new XML(e.target.data); xml_2.ignoreWhite = true; var il:XMLList=xml_2.channel.item; for(var i:uint=0;i<il.length();i++){ ///display feed var currentFeed:URLRequest = new
[code]....
View 14 Replies