ActionScript 2.0 :: Restrict To Numbers INCLUDING Space?
Apr 18, 2005I'm trying to make an input box restricted to characters 0-9 including the space bar.I can do;mytext.restrict = "0-9";but how do I account for space?
View 1 RepliesI'm trying to make an input box restricted to characters 0-9 including the space bar.I can do;mytext.restrict = "0-9";but how do I account for space?
View 1 RepliesI'm trying to make an input box restricted to characters 0-9 including the space bar.
I can do;
mytext.restrict = "0-9";
but how do I account for space?
I have a text field (for names) wich must allow all characters, except latin numbers, is this possible? I can't think of a regex for this
View 2 Repliesi want hi i want to restrict user from entering starting space
in as2 i have this
function LTrim(str:String) {
for (var k = 0; k<str.length && str.charAt(k)<=" "; k++) {
[code]...
i want to restrict the input to numbers only, but do have a problem for an empty entry:
now accessing like this:
var newValue:Number = event.itemRenderer.data[event.dataField]
newValue is now for an empty entry not null, but 0...
How I can include the . in the restricted text field. I know how to restrict to only allow for numbers, letters etc... but what I need is to only allow numbers and the dot.
View 4 RepliesI want that the users will be able to insert only numbers in a specific TextInput.
View 1 RepliesIs there some easy way to restrict TextInput to accept decimal numbers in range -99.999999 to +99.999999 ?
it is Spark TextInput.
I am trying to restrict a TextField to 2 numbers and 1 decimal place, so something like: 3.5, 22, and 33.5 is acceptable.
View 5 RepliesI want to restrict a text box to to use a specific range of numbers, say from 35 to 40.[code]...
How do I restrict it to only allow the 6 numbers between 35 and 40?
Is my only option to use a control like a combo box and fill it with the numbers I want to appear?
I would like to restrict user input to numbers only between letters. for example: the user is allowed to input "a2b", but "2ab" or "ab2" isn't allowed.
View 4 Replieshow can i restrict the values inputted into my TextInput control in my mxml page to only numbers.
View 1 RepliesI'm doing a calculator and making space between every third number, ie make 1000000 look like 1 000 000. It has to work dynamically, so if the result is 10000 it should show 10 000.
I'm doing a flash 5 movie.
I'm doing a calculator and need help with making space between every third number, ie make 1000000 look like 1 000 000. It has to work dynamically, so if the result is 10000 it should show 10 000. I'm doing a flash 5 movie. I guess it's classic programming, but I'm not so good at that.
View 1 RepliesIs it possible to add kerning (letterspacing) in-between the numbers in a date counter? For example lets say I have a date counter that counts the dates of a month (1,2,3,etc...) and I have two circles sitting side by side not overlapping. How would i go about adding a space in-between the numbers to have the number on the left in the left circle and the number on the right in the right circle? Someone mentioned using strings but how would I go about doing that? Here is the current code that I am using:
[Code]....
I have need to restrict user input. TextInput should restrict all special characters and punctuation. Any other characters are allowed. In java there is a regex patter:
replaceAll("\p{Punct}", "_")
Is there something similar in actionscript?
how to do this and not found much, so here goes:
I want to generate a variable number of random numbers less than 16 with no duplicate numbers
Ive posted the fla, and what i'm doing is generating a random number and putting it into an array then using a for loop to cycle through the array for each new random number to check if its already there. if it is, then i want to regenerate that number.
if you test the fla you'll see that all i get in my array is some lovely zero's and i sort of know why this is, but don't know how to stop it.
I am trying to convert a string having numbers to an integer.
//15 9's are there
var str:String="999999999999999"
var res:Number = new Number(str);
But it is not able to convert correctly as the the var res now has the value 100000000000000000. I know that the number has 52 bits of memory, then why is it not able to do the conversion?
Generate four random numbers with the total of the four numbers equal to100?[code]...
View 8 Repliescreate a function that picks out X amount of numbers from a set of numbers? So if X=3, then i need this function to pick out 3 different numbers from say a set of numbers (1, 2, 3, 4, 5, 6, 7, 8) and then stored it into X number of variables.
In saying that, X will only =2, and =5. So in the first instance, i'll need 2 random numbers from the set above that are not the same numbers, and second instance 5 random numbers from the set above (also no repeats of numbers). Then i need to be able to store those 2 or 5 different random numbers from the set into variables to call them with other functions.
what is the syntax to pick how can i pick 6 random numbers from 49 numbers
View 9 RepliesI am generating random numbers between two numbers by the code bellow:
ActionScript Code:
public function randomRange(max:Number, min:Number = 0):Number
{
return Math.round(Math.random() * (1+max - min) + min);
}
trace(randomRange(3,-31));
But I need a code which will return some times '3' and some times '-31'. Not the number between them.
I have been using Actionscript 3.0 in Adobe Flash Builder for a few weeks,and I really like it! Bare with me because I'm not really good at it, yet. Anyway, I was wondering how would I go by adding up odd numbers from an array of numbers? I know how to make all of the numbers add up, but adding only the odd numbers I'm not so sure how to do it.
View 5 RepliesEverything seems to be a string right now & that kinda ruins the whole xml as an internal data structure thing, I don't need a big tree of string I need typed data :-/ Are there any changes I can make to either my XML files or my AS3 code that will force it to cast ints as ints and Numbers as Numbers? Or maybe some kind of type schema I can impose? Not really worked with XML til recently so chances are I'm just ignorant of the canonical way to deal with this...
View 4 RepliesI know this is simple - but I want to do a slideshow without XML. I want to include the image files within the .fla but I'm trying to find a way to make it scroll through 3 images included in the file with a fade in/fade out effect. But I don't want to make it so I have to tween the images (alpha) to fade them in and out. & I want it to loop.
View 3 RepliesI have a question for u, is there a way to include a win media player in a flash application to play a live stream generated for win media player?
View 2 RepliesIve been trying to include an swf with buttons, that plays .flv videos, into this html page: [URL] (feel free to view source) Im having trouble because i think the swf 'links' to flv files, and neither are in the same directory as the html page - the swf is just not showing up. i dont want to duplicate the swf and its corresponding flash files if theyre already hosted once by this client - does anyone have a solution, or is the problem actually something else? the swf files can be downloaded at: [URL]
View 1 RepliesI am using FlashDevelop 4.0.1 RTM to create a simple Android app and I would like to ask how to include external assets (images, xml & sounds located inside the bin folder) to the apk package.
View 1 RepliesI am developing flash app to be embedded in the html page, and i have some text in the swf file with certain font.Now,on platforms that does not have those fonts, it will definitely display different fonts than the one I originally intended.I could use the character embedding feature, but there seems to be only two options.One is include all the glyphs which make the file to be monstrous size or
there is an autofill button which will only embedded letters of the font that are in the swf file.Now the problem with the second approach is that,the word will change dynamically making the second option useless. i.e. if word (thus letters) change such that it contains letters whose glyph or whatever is not embedded it is a problem you can see.
Plausible solution for me seems to be include all the letters for desired font, which I could not figure out how to do it or if it is possible to do this at all.Or if it is possible to just copy those fonts into one of my web hosting folders, and dynamically loads them.
[URL]... I need that in my flash site, no-one can help me with making it, so how can i include that instead?
View 1 Replies