Using Comma Separator In Numeric Variables
Nov 13, 2009
In my movie i have a shopping cart which adds up a total of all items. When the total reaches more the 1000.00 i need to add in a comma separator as in 1,000.00 if i do this manually flash no longer see's the variable as a number, how do i get around this one?
View 2 Replies
Similar Posts:
May 19, 2009
i want to remove comma from the variables.
for example,
str = 65,321
in these i need to remove comma. so my str should be 65321. is there any build in functions....
View 4 Replies
Oct 30, 2004
I am working on a file that displays two variables, a and b. The two variables are percentages, and they both start at value 50. Now what I want to do is to display both variables, and when the user presses the 'up' key a should go up and b should go down. When the user presses the 'down' key, it should be the other way around. And a+b= always 100.
I made this little action script:
var a:Number = 50;
var bNum:Number = 50;
if(Key.getCode() == Key.UP) {
a++;
b--;
[Code] .....
Then I've made two text areas, both in their own layer. I've put them both on 'dynamic text' and where it read 'Var:', I have entered 'a' for the first and 'b' for the second. In both text areas, I entered '50'. Obviously, it doesn't work. I test the movie, and nothing happens when I press the 'up' or 'down' keys.
View 3 Replies
Sep 21, 2007
I have a project that needs to store user input on the server, then be able to reload it later.I am interested in opinions as to which separator would be best to use, ie comma, semicolon, tilde, etc. Of course whichever character it is, it will be restricted from usage by the user, so it must be uncommon.I'm leaning towards using the tilde, since I already use input textfield restrictions to prevent backticks for server security (same key on the keyboard). Seems to me as if the tilde is a very rarely used character, and so should be fine to exclude it from user inputs as well.
View 1 Replies
Feb 8, 2011
How do I put a line separator between two lines of dynamic text in Actionscript 2.0?
View 4 Replies
May 21, 2010
I have a s:List where I've defined my own itemRenderer, and would like to insert a horizontal line separating items, similar to the way the mx:LinkBar works. I don't want to have a line at the top or bottom of the list, so I can't just include an upper or lower border in the itemRenderer. I was hoping the itemRenderer could be made aware of its index in the list, but I don't see how.
View 2 Replies
Feb 17, 2011
Is it possible to remove the horizontal separator which divides the headers with the data? I managed to remove the vertical ones with mx.skins.Programmatic skin, but could not find a way to remove the horizontal separator.
View 1 Replies
Jul 13, 2011
I must display very small values (capacitor) in a Flex-AdvancedDataGrid I use spark.formatters.NumberFormatter. If I use 3, 6 or 9 for fractionalDigits, everything is fine.
But if I use 12, because I need 12 digits after decimal separator, then the value is cut after 9 digits!
Is there a way to get more then 9 digits after separator.
Or is there a way to use a formatting like "4.7 E-12" (Must be E-9, E-12, E-15 and so on)
View 2 Replies
Jan 5, 2012
I've created a custom MenuBar to make this happen. But it just doesn't seem to happen. It never renders any of the changes I made to the Graphics.What am I doing wrong?[code]
View 1 Replies
Jan 20, 2012
I am trying to create a dropdown that can display both past state and possible state for a customer.But I want to make add a separator between past and possible state.Actually to do that I add an item like "-----" on the dataprovider.But the look and feel is not good and this item may be selected.My ideal approach is something like that:
View 2 Replies
Sep 21, 2010
I see examples in the SWFAddress documentation, but it's not clear what the convention should be for a multi-level path. Do their examples intend to suggest that the path separator should be a hyphen?
View 1 Replies
Mar 16, 2009
Real simple question;How would I code in AS2 to add commas to a value in myText.text which recieves input from xml?Say if the value is 1000000, I want it to say 1.000.000.
View 6 Replies
Dec 10, 2010
is it possible to make a comma (,) to equal (.) in as3?
example:
now i write
2.31 + 4 = 6.31
so it's possible to write
2,31 + 4 = 6,31
View 6 Replies
Jul 16, 2009
I'm using an input field in which users can do a certain calculation. Everything works fine. But what I want is that when users type a comma (f.e.: 1,2) the comma will automatically be converted into a dot.
View 1 Replies
Sep 2, 2009
I have a movieclip, mcMenu, on the timeline which contains a dynamic textbox, txtMenu. I'm using this code:
[Code]....
When I trace the array, it appears correctly in the output window. In the textbox, there is a comma at the start of every line except line1. The dynamic textbox is set to Multiline no wrap, although I find that results are the same with Multiline. If I remove from the lines of text, it is wrapped in the textbox. I've tried removing the with the following code but it still wraps: mcMenu.txtMenu.text = mcMenu.txtMenu.text+newline+arrMenu[i]; I don't really know if the comma indicates a blank line but there are no commas in the text at all.
View 6 Replies
May 28, 2010
ActionScript Code: var dataString:String = "Hello, this is me, I am a cow."; var lastoccurence:int = dataString.lastIndexOf(","); trace (lastoccurence); //Returns 17. How to I replace character (17,1), meaning the "," with "" ?
View 7 Replies
Jan 31, 2011
I am VERY new to Flash and Action Script (using Flash 8 & AS2) and my company butchered by training budget so I have zero $$s to learn. I have been muddling through with these great forums and tutorials but this has got me stumped.I have a button to calculate some simple math from number stepper components to populate dynamic text boxes.The script I came up with works but I need the return values to have decimal (2) and comma (at the thousands).[code]
View 3 Replies
May 4, 2010
I have the following XML
[Code]...
What I want to be able to do is to extract all of the items listed in the categories and put them into an array as individual items. So would like have an array that contained Cosmetics, Pharmaceuticals, Food, Sportswear, Football, Rugby and Tennis as individual items within the array.
View 6 Replies
Sep 23, 2010
I have this working, but I am looking for a better solution.This bit calculates to total amount and rounds up:
Code:
textTotalVar = Math.round(text1Var * text2Var * text3Var * text4Var);
textTotal.text = textTotalVar + " lb/hr";
This bit toggles the comma if textTotalVar is a thousand or greater.[code]........I would like more space on either side of the comma so it doesn't look crowded. How can I do the below when the total value is five characters, for characters and three or less with a hidden comma?
Code:
textTotal.text = first character of textTotalVar + " , " + last three characters of textTotalVar + " lb/hr";
View 3 Replies
Mar 24, 2010
im new with regexp, so can i ask for some assistance
Using string.replace function what code that can replace spaces with comma
Input:The quick brown fox jumps over the lazy dog.
Output:The,quick,brown,fox,jumps,over,the,lazy dog.
View 1 Replies
Jul 11, 2011
I have a simple calculator I've put together but need to have all numbers formatted with commas. [code]...
View 0 Replies
Jan 28, 2003
I have a bunch of text fields that display numbers such as 2745345.What i want is a neat bit of code that quickly and simply converts this to 2,745,345.This makes the numbers more easy to read and interpret.
View 5 Replies
Mar 9, 2007
I have a text field where the user can input their salary, the only problem I have is that if they put a comma in it will break the calculations, so I need to be able to take the amount they give and then rip out the comma and have it just be the full number so I can do the necessary calculations with it.
I have everything working fine otherwise, just need to fix this *hopefully* minor issue.
I am working in Flash 8, but am exporting out with AS 1.0 due to limitations in the base movie file (that I did not build).
View 5 Replies
Jun 24, 2009
String.search function thinks that dot and comma (. and ,) is the same thing. Is there a way to fix this? I want to find comma and it gives me a dot.
View 2 Replies
May 30, 2011
I'm showing the users score in a textbox. But if the number exceeds 1000 it should show 1.000 example: 10000000 => 10,000,000 I've been searching a lot on Google, but I just can't make it work. Can anyone help me with this? I've started something out with this code:
[URL]
Also, if I had the correct function, how would I made it split too if the number was 10.000, 100.000, etc..
View 3 Replies
Mar 30, 2010
I can't seem to find anything that would let me to easily show a Number in a label, textinput, etc. with comma separation.
like in a label, show number 123456.78 as 123,456.78
[Bindable]
private var num:Number = 123456.78;
<mx:Label text={num} />
Obviously I could just create a function, but is there a more simple way?
View 1 Replies
Feb 13, 2009
how to send off multiple variables in an object (from a class) to the FLA file...[URL]The setup: I have a class that extends EventDispatcher. I created an Object called _pass, public var _pass:Object;.In my last function (everything is cool up until now), I have four variables that need to be passed to the main fla. Let's say they're param1, param2, param3, param4.
It was explained to me that I could use the public var _pass:Object; by first creating an instance of the object like so, _pass = { param1, param2, param3, param4 }; (each param is available in the function). Having setup an object instance, I could then dispatch the object to read from within my fla: dispatchEvent(new Event(Event.COMPLETE));.
But I get these errors:
Quote:
1084: Syntax error: expecting colon before comma.
1083: Syntax error: rightbrace is unexpected.
As the livedocs show, you can use an associative array (with braces and a colon), but I don't need that. I just need to pass my variables that are pre-made to the FLA.
View 6 Replies
Oct 7, 2008
Convert XMLList to Array / comma delimited list ?Consider this XML[code]...
View 5 Replies
Nov 1, 2010
I'm working on an iPhone game, and the artists are supplying the animations in flash format. I need to be able to extract the images, image positions, and image rotations in a comma delimited format as input to my iPhone OpenGL Rendering Engine. Are there any tools that let you do this? Perhaps this is a really basic question,
View 1 Replies
Oct 14, 2009
I've a regex that matches comma separated numbers with an optional two digit decimal part in a given multiline text.
/(?<=s|^)d{1,3}(,d{3})*(.d{2})?(?=s|$)/m
It matches strings like 1, 12, 12.34, 12,345.67 etc successfully. How can I modify it to match a number with only the decimal part like .23?
EDIT: Just to clarify - I would like to modify the regex so that it matches 12, 12.34 and .34
And I am looking for 'stand alone' valid numbers. i.e., number-strings whose boundaries are either white space or start/end of line/string.
View 3 Replies