[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 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.
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 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?
I'm making a timeline with a moving car. It has to go from left to right in about 11 hours. I got this code and the car is moving from left to right:
[Code]...
But everytime I refresh my page the car is at the begin again. So I have to attach it to a Timer/date class to it so it stops at a certain point / time and date.
How to fix date to retrieve minutes/hours with zeros ? E.g. it's 05:09 AM > trace(_date.getHours()+":"+_date.getMinutes()); //5:9 But I want 05:09 instead of 5:9 - so how to add zeros? var _date = new Date(); _min = _date.getMinutes(); //fix date: var _str:String = _min.toFixed(1); _min = Number(_str); trace(_date.getHours()+":"+_date.getMinutes()); = 5:9 ....
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.
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 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 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.
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?
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.
Today is 28-05-2010, so I need to list Event 01. On 01-06-2010 I need to list Event 02. I have the basic AS3 code for listing the XML working, but I'm having trouble filtering the result.
I'm trying build a simple band site using flash and as2. All I want to have is a page listing shows that sorts them according to date and also when the show date has passed drops that entry from view.I can do this easily enough with a database and php but want to learn how to do it in actionscript. Here is what I currently have, shows load from the xml file into a simple textbox:
Code: scrollBar.target = shows_txt; showsXML = new XML();
I'm using flash CS4 and actionscript 2.0. I have a situation where I need to locate and check the date of an external file (either .exe or .swf) and return that date string to a variable in flash. I then need to display that date to a piece of dynamic text within the flash file. Is there a function within action script that will check and retrieve the file date of an external file.
my date of string like (2009-12-03 21:05:00) date with time . so i used to store var newdate:Date=new Date(Date.parse(startdate)); but shows some errors.and also i tried to split string(date) used date function likevar datenumber:Number= (new Date(Date.parse(startdate))).getDate();
Does anyone know how to get actionscript to render a null date value '000:00:00T00:00:00'? I am calling a web service that expects date fields in the SOAP xml. I need some of these dates to serialize as null and I can't see how to produce null. The closest value I can get is '1899-11-30T00:00:00Z'. Below is the code I am using:
I'm trying to get a random date in a date range and this is what i have so far but it doesnt seem to be working ? Where I'm I Going wrong ?Gets the date difference
private function differenceBetweenDates(date1:Date, date2:Date):Number{ var MS_PER_DAY:uint = 1000 * 60 * 60 * 24;[code]..........
I have an mx:DateField in my Flex UI that has a formatString="dd.mm.yyyy" attached to it. However, the initial value for that field may not be in the format specified/defined for the DateField (due to legacy reasons). So, currently, if I just set that value (text) on the DateField, the field is shown empty. I think because it fails to accept the value in a format different than what's configured.
I have 2 DateFields named startDate and endDate I want to set startDate's Selected date to Current months start date and endDate's Selected date to Current months End date.