ActionScript 3.0 :: Increase Value Of Numbers In Xml File
Dec 27, 2010i was trying to edit my xml . i want to increase the value of the numbers in my xml file.[code]
View 4 Repliesi was trying to edit my xml . i want to increase the value of the numbers in my xml file.[code]
View 4 RepliesI have a movie clip with a starting number of 3.75 and I was this number to increase to 6.00 and then stop. I know this should be pretty simple to do with a little actionscript.
View 3 RepliesI have 3 buttons. When i click on the button1 i wish to increase the number to 1, when i click button 2 i wish to increase number to 2 and when i click on button 3 i wish to increase to 3....so it must increasing 1,2,3... But the problem is, when i click on the first button back twice i wish not to show me the number 1, but i wish to disable the counting because we have already click on this button. I dont need the this.enabled = false; code but something count == 0, but is not working.
[Code]...
How can I increase the _height property of a window without increase the height of the title and the bar at the top of the window ?
I want only to increase the part of the window where I put textFields and buttons.
i'm developing an AIR application in Flash Professional CS5 and noticed that my .swf file size jumps from around 100kb to 900kb just for using TLF?! is this normal? that seems like an awful lot of extra weight for a few more options over regular TextField objects.
View 2 RepliesI am trying to increase a swf file height and width so it can fit better in my screen. I don't want to rework on everything again in my fla file because it's big hassle. (changing background size makes every symbol off). Are there anyway to do it?
View 3 RepliesI have a small question about the size of images imported to flash.Recently I imported a series of png images to flash CS5 to be used in an animation, 92 images to be exact. Each image was 34Kb size. Before I imported the images, the FLA was 6kb, and after I imported them the FLA was 160 MB large. Now 33Kb * 92 isn't 160 MB, so why does this happen? Is there any way to decrease the image quality or something when importing, or do I have to do that manually when creating the images?
(I used photoshop, and the images have a transparent background if that makes a difference).
which one will increase the file size?
1.coding(alot enter frame)
2.using time line
if i use alot coding will the flash be crash ,what cause crash ? well i have the right coding. but i am saying if too much coding will it crash too ? like if using too much enter frame.
when importing sound into flash. the file becomes a lot larger than it should be and this has happened to me many times before. heres a scenario to describe what i'm talking about:
original file size: 900 kB
music file size(to be imported): 5000 kB
import the music file size, and it should be automatically compressed (usually i get a message at the bottom of the properties window for the sound, saying that it was decreased to 10-15% the size of the original file). even without the compression, the file size shouldn't be more than 5900kB (900 + 5000), right? well oddly enough, it isn't. it might increase by 3 times this amount from what i've experienced in the past(to about 18 000kB).
this has caused many problems for me including the inability to upload files(due to upload limits) and slow file transfer, which is the reason i decided to bring this up.(file sizes increase greatly when importing sound)?
Is there any easy way to put the page number at the bottom of a page within a movie?page 1 is on frame 1 etc and so on
View 2 RepliesI've been working on a project for a while but got stuck where I have a text file that contains a set of numbers in this format[code]...
So I must read the numbers from the file and put them in an array according to the column so at the end I have[code]...
I am almost finished with my project and I am once again stumped on how to tackle a search feature. I have one more section to do that will be a printing function.
Having an XML file, I need to search this file based on a range for criteria.
My XML data will have many sets of data separated by a gamenumber tag. The gamenumber is unique in value but the sub data will not be. There will be same values in that range.
So what I am looking to do is search anywhere from 2 to 10 gamenumbers at a time with 2-10 numbers. These numbers are in an input box and get called from a click event listener.
I have the routine working to search 1 data set but I can for the life of me think of how to do multiple data sets in one shot.
Here is an example,
Search games 2-5 for numbers 2 7 13 19 43 80 etc... Each number is in it's own input box.
The results could be an array or 4 different strings. It should be dynamic because the searches will changes from 2-10 games.
I am using an if else if statement to separate the searches and run it's own routine. So when the start number is not null and the second search number is null, it only searches a single record. The search parses only the data based on the start number search input box.
But if the end number is not null, it will go to the routine and search the scope of the the number range. I am thinking that the routine starts with the start number and then use each gamenumber in a loop to parse the data for that game only and store the results. Append each result into an array or strings.
I looked at for each and for in loops but I am not seeing who to put it together yet.
Here is what the XML Data looks like
Code:
<?xml version="1.0"?>
<Container>
<Game>
[Code]....
Just wondering. Is it possible to load data from a external txt file in AS2? in particular using the data loaded as a number variable to use for say a Maximum number in a timer counter? for example, say the text file has the variable&numOfPhotos=3how can you make it so flash AS2 can read the variable and convert the number (which I guess is a string) into a Number variable, ready for the swf to use in number related activities?
View 4 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.
I ran in to a problem I could not solve for a very long time While I was using Actionscript 3 in order to change the text of a classic text object in my .fla flash file, I did not see any change in my text field, and noticed that it doesn't display any numbers and some other characters (just some specific letters DID work).
View 1 Replieswhat 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 RepliesCan anyone tell me if there's a way for changing the frame rate of a swf movie whithout opening the fla with the Flah IDE.
View 2 RepliesI'm creating a thermometer with the mercury animated as donations come in. I haven't touched flash in a long time, so be gentle.
How can I change the code below so the animation is faster without increasing the framerate?
var maxMercuryHeight = 192; // Mercury height at 100%
var currentDonations = 80; // Percentage of donations taken
var currentHeight = (currentDonations / 100) * maxMercuryHeight;
[Code]....
How can I make the animation ease out so it starts fast and slows down at the end?
I've been working on a flash animation that has been set to 12frames per second, but now my boss has told me it needs to be 25fps - but when i change the frame rate in 'modify>document' the whole thing just speeds up. Is there a way to increase the fps whilst retaining the original speed?
View 1 RepliesI have this code, which should work fine, but it doesn't.
Unit1_Mobs_Destroyed += 1;
Text="Unit 1 destroyed "+Unit1_Mobs_Destroyed+" Mobs!" It should set Unit1_Mobs_Destroyed to current value + 1 If Unit1_Mobs_Destroyed is 5 at the start, it should be this: Unit 1 destroyed 6 Mobs But that doesn't happen instead I get this: Unit 1 destroyed 5 1 Mobs
increase the actual workspace. Not the size of my stage but the actual box that is around the stage. Mines a light gray. Its just I have stuff the needs to be way way off screen and there seems to be a limit on how far the project extends.
View 2 Replieshow can I increase the size of flash CS4 interface? Meaning also to enlarge tools buttons, so they are easier to see. I have to strain my eyes, because all of the toolbars and text related to them are too small, for constant work.Is this possible? I know there is one way - to increase display DPI settings, but that would also increase the whole desktop, but I would like just to increase flash interface text size and if it is possible then also tool buttons.
View 1 Repliesi have a question about code comments do they increase the size of the compiled .swf or are they completely ignored by the compliler the reason i ask is i have several lengthy functions written various ways and I have the functions i'm not currently using commented out......is it ok to leave these commented or should I make several class files ?
View 3 RepliesHow do you increase the size of an entire movie into an actual swf file? I note that increasing the stage size increases the "frame" that the movie opens in, but does not increase the size of the movie itself. I find a lot of stuff on the internet about sizing a flash movie using html embedding, and perhaps that is what I need...but what I really mean is change the size of the whole movie before it is saved as an SWF and within Flash itself. Is there a simple way to do this? I mean, once you have the movie in place but have simply not saved it to SWF yet. Again, I note that cghanging "size" on document properties enlarges the frame that the movie opens in but not the movie itself.
View 4 Replies