ActionScript 2.0 :: Add And Subtract A Number To The Var CurrentProj
Apr 7, 2005
i want to add and subtract a number to the var currentProj heres my logic start value for currentProj is 0 code on prevbtn currentProj -= 1; // should subtract 1 from currentProj when prevbtn is clicked the variable currentProj goes from 0 to -1 to -2 to -3...etc with every click. this is fine once i set my limits at zero
code on nextbtn currentProj +=1; // should add 1 to currentProj when nextbtn is clicked the variable currentProj goes from 0 to 01 to 011 to 0111...etc with every click. this is whack I've wasted an hour trying to work
I am kind of new to Actionscripting, and I have kind of hit a brick wall. I have a variable that I want to subtract the number one from, but I have this formatted incorrectly.
on (release) { var currentslide = 2 var subtractedcurrentslide = (currentlide - 1); txt = String(subtractedcurrentslide); var myString = subtractedcurrentslide + '.' + 'swf'; loadMovie(myString, "rightcontent_MC")
And in the stage i have 3 dynamic text boxes. The 1 one has the variable number1 the secound one has the variable number2. But how do i do so in the third box it says 20? I want it to substract number1 and number 2 and show that in the box.
How can -1.4033418597069754e-14 round down to 0? And Math.round(thisRotAbs) also results in 0. So how can this be? And how can 180 - -1.4033418597069754e-14 = 180?
[code]This passes the date to another function that uses the date to see who in my office is oncall in the database and displays their name. The problem is, everyone that is oncall has to be oncall until 7am the next morning. So this works great IF they were off at Midnight each night. Is it possible to subtract 7 hours from this date?
i'm trying to subtract a very small value from given height.
myMC._height -= .05;
it just doesn't subtract anything. so is flash ignoring to subtract it, possibly because i've too much in my flash file? then again, this works: myMC._height -= .20;
I'm working in CS4 and using ActionScript 2.0.I need to display a date that is five days in the future and a date that is five days in the past based on whatever the current date is on the user's system. The dates must be in the format M/D/YYYY.After much struggling, I figured out how to make the current date display by creating a dynamic text box named showtoday in a movie clip and adding the following ActionScript to the movie clip:[code](Please mentally replace the silly smiley face with a colon followed by a capital D.)Can anyone tell me where to go from here to add or subtract five days from the current date?
I am trying to build a game just for fun and i found something interesting that i really don't know how to do, so any help that you can give me is going to be useful, this is what i need to do, i have a movie clip and i want to subtract another one from just like THIS i can detect the contact but i don't know how to do that.
I'm working on a game for young children and basically I have a dynamic text field with two buttons - one to increase the digit by one, and one to decrease the digit by one. The problem I am having is that although the box starts at 0, you have to click the add button twice to get it started (the same thing with the minus button). After two presses, it increases fine with each single click.
ActionScript Code: var inside:Number=0; inNum.text=inside;
As you can see are the button names: home, about, service and contact. This are also the names of the external swf's. But now I have chanced my button names in: btn_home, btn_about, etc. Now is it a little stange to name my external swf's btn_home etc, so how can I substract the prefix btn_ from the buttons so that the externa swf's can keep their normal names? I know it has something to do with substr but I don't know how and where to implement it.
I need to be able to subtract 2hrs ,8hrs, 1 day and 1 week from the current Date.Then convert to yyy-mm-dd hh:mm:ss format.So far I have been unsuccessful.What is the proper method to do this in actionscript?
Dear Guys I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It , Is There Any Solution
I'm trying to determine the difference in time between todays date and a future date. I only need to determine how many months and days it is between todays date and this future date. Anyone know of any prebaked scripts anywhere for determining what todays date is and subtracting it from the end date would be? [code]So if today's date is less then the end date I'd like to determine how many months and days are left until the end date is reached and display the number of months and days until that end date.
Lets say I have 4 items on the stage item1_mc, item2_mc, etc...they're stacked vertically with a small space between them. I wish to cycle through these items with two keys, up and down respectively...how would I go about doing this?
My current idea is to create an array of these items and have each press of the key add or subtract "1" from the current selection...is this the correct method to pursue? Are there better options?
I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It,
Inside my code i have some variables declared as Numbers, and i get some others from an external source; these variables can either be Numbers or String representation of Numbers. Now, i have to implement some equality controls on these variables, and since i don't know in that moment which type are them of, i'm converting all of them to Numbers (i don't need and neither want to compare strings) via the Number() function which accepts either Numbers or Strings as an input. These controls can compare 2 single variables or a variable and a sum (or subtraction) of other variables, for example:
I'm trying to create a shuffle button for my mp3 player. I don't want it to repeat any song in the xml playlist until all the songs are played. Is there to display a random number on the click of a button, without repeating any number in the array until all the numbers in the array are used?
SO, I want to do a very simple program, and I have no clue how to even get started. This is what I need to do. Several Different boxes to put something into. I Have Done That, I can type into them. Their instance names are
Box1 Box2 Box3
Heres what I have no clue on how to do though, completely lost. Box 1 needs to have the value psr.
I would like to know is there any limitations in flash textarea like the number of lines it can have or the number of bytes it can have. iam opening a text file using php in textarea, where all the contents of the files are not getting loaded in the textarea. If it is there then how to increase its size, is it same thing in flex?
I get the right number when I click on only '+' or only on '-'But if I click '-' until 0.7 and '+', it stays at 0.7 The same append when I click '-' until 0.9 when '+', it stay to 0.8. Why? How can I do to increment or decrement a Number by 0.1?
i got a input text , how do i set some number if they input the right one?like i want (2,4,6,8,10) to be true if they input the the same number ,i want boolean to be true how i going to do this?