ActionScript 2.0 :: Displaying "01" Instead Of "1" When Showing Numbers?
Aug 29, 2009These are not dates, but rather 20 text fields that count from 1 to 20. But I want to be able to do 01 02 03 .... 20 instead of 1 2 3 ... 20.
View 3 RepliesThese are not dates, but rather 20 text fields that count from 1 to 20. But I want to be able to do 01 02 03 .... 20 instead of 1 2 3 ... 20.
View 3 RepliesI have a preloader and I've noticed that the percent_tf.text doesn't always show the percent loaded.
View 3 RepliesI tried searching the forum and web on this, and I'm sure it's out there somewhere, but couldn't find it. I thought I was done with my project today- and at the nth hour, right before it was time to go home, sigh, - I realized that for some reason, neither the numbers or punctuation were showing up in dynamic text that was being pulled in via XML. Anyone know this one? I'm an XML dummy.
View 2 RepliesThe following program gives me the results in the output panel because I used trace. The problem is that I want these numbers displayed when I click on a button. The numbers should not duplicate when the button is clicked, for example not "3, 3, 2" but "3, 2, 5". Here is the program that randomly selects numbers (which by the way is not mine): (I'll happily donate 15$ to the animal charity of your choice for whoever can give me a hand with this problem
var mynumbers:Array = ["1","2","3","4","5","6"];
var mystuff:Array = [];
var randomCount:Number = 3;
[code]....
I am trying to make a spinner application in order to help teach students probability.I want it to be customizable so teachers who use the application can change the number of divisions of the circle, how many different colors the different sections of the circle are, and whether or not to display numbers on the sections as well.So for example the teacher could say, I want 5 divisions with 2 colors and no numbers showing.Or I want 10 divisions with 5 colors and numbers showing.
A:make a circle with a specified number of divisions.
B: Color those divisions different colors.
I am eager to see if this is possible via code, because it is well beyond my paygrade; but that isn't saying much
I have a .fla file with a movieclip that has a dynamic text box in it. In my .as class file I'm setting the dynamic text's text with _clip.Score.text = "Points: " + _score.toString(). This seems like it would work but for some reason the following results happen:[code]
View 1 Replies[URL]
Go here, click on Folios, click one of the albums, then move the mouse close to the footer to get the thumbnail nav to pop up.
She wants to replace all the numbers for "Image" and "Total" to her handwritten numbers. How would I go about doing this?
I am displaying dynamic content in my flash. Dynamic data is coming from XML and in flash file, html entities are not showing right, strange characters are displaying there. Here is link, [URL] See featured work description at the bottom of the link above, if there is no special characters in description then refresh the page. You will see special character in description (like question mark and sometimes square box, etc.)
View 1 Replieshow 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 have a problem with my input text fieldsI to type numbers with commas like "2,5" but flash only allows me to type numbers with dots, like "2.5"
In Sweden where I live we only use commas on numbers.
Now I have some input textfields that I must change so they work with commas instead of dots.
What I have is 5 input boxes (*input1,input2,input3,input4,input5) and one dynamic text box (*total).
So I add input 1 and input2. Then subtract input3-5 for my total of 49.99 and my incorrect always fires.
I have traced al the var's using typeof() and they come back as numbers.[code]...
I am using a code to load images into random movieclips and this works ok but I am getting a lot of repeated numbers[code]...
How can I add a code for it to check if the random number has already been called.
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 Repliesim working on a project for a website, i'm currently having a lot of trouble when i try to add two numbers together.
[Code]...
it all works fine apart from this line here where its adding the old "numberstore" in with "number2" to create the new "numberstore". I've tried all different combinations to get this to work, but all i keep getting is e.g. 1+1 = 11 not 1+1=2.
I have 12 icons for example, and each icon have a number and I want (when each one is selected) to make the total of them.
Example:
bublle1 = 12%
bublle2 = 24% when i click this too the total number should appear on screen 36%
How do I add numbers in Actionscript 3? I have two dynamic texts
totalscore.text = "3"; and
myscore.text = "2";
I'm trying to add them like this
totalscore.text += myscore.text;
And I get this answer 32 instead of 5 it just attaches them instead of adding. why? I also tried it like this
var my_score:Number = myscore.text;
totalscore.text += my_score;
But it still attaches them numbers together instead of adding.
Is there a way to find out how far a number is from zero, like -30 would be 30 digits from zero and the same for +30.
View 1 RepliesHow would you randomize a specific set of values in a array?[code]...
View 6 Repliesim having trouble adding numbers together. I keep getting this result: 50505050 etc
this my code:
i(50);
function i(count) {
var myNumber:Number = Number(count);
[Code]....
I've been Googling tutorials and so forth but can't find something like this.I wanna do a Preloader, except rather than having"50% Loaded"I want"fifty percent loaded"How does one do this, without having to write in 100 frames of individual text?
View 3 RepliesI have yet again another simple problem that I've tried to solve 10 different ways, and nothing works. I'm simply trying to add two input text fields' numbers together when the user presses the left arrow key on the keyboard. I'm trying to avoid just typing names in the Var boxes since the text fields' formatting are slightly different. Here's my current code I have attached to the button:
on (keyPress "<Left>") { var Wager = int(_root.AWager.text); var ScoreA = int(_root.Ascore.text); WagerA+ScoreA;
}
[code].....
How to get unique random numbers every time in AS3
I have searched but not able to get satisfactory results
how to split the numbers in as2.
View 4 Replies