Actionscript 3 :: Flex - Calculate Hours Between 2 Times?
Oct 23, 2009
I am building a scheduling system. The current system is just using excel, and they type in times like 9:3-5 (meaning 9:30am-5pm). I haven't set up the format for how these times are going to be stored yet, I think I may have to use military time in order to be able to calculate the hours, but I would like to avoid that if possible. But basically I need to be able to figure out how to calculate the hours. for example 9:3-5 would be (7.5 hours). I am open to different ways of storing the times as well. I just need to be able to display it in an easy way for the user to understand and be able to calculate how many hours it is.
View 2 Replies
Similar Posts:
Dec 9, 2011
I am using FLEX version 3.0I want to calculate the total working hours. I am giving you the details and what i have done in it.
var a:Number = 2.00;
var b:Number = 2.00;
var c:Number = 1.45;
[code].....
View 3 Replies
May 7, 2006
As per title said how to calculate the hours and minutes for 2 diferent values eg;
value 1 = 9.15 AM
value2 = 2.45 PM
So I want calculate how many hours and minutes between this 2 values..
9.15 AM -----> 2.45 PM
View 4 Replies
Jan 25, 2012
I'm getting a data which contains a certain number.
I need to find how many hours, minutes and seconds it stands for.
for example:
I'm getting the number 248 which means:
00 hours : 04 minutes : 08 seconds
View 3 Replies
Jul 25, 2010
Is there a way to compare the current time to a bunch of times (loaded from XML) and have it figure out which is the closest to the current time?
View 3 Replies
Apr 10, 2011
I want to show a full 24 hours along the datetimeaxis wherever the values fed into it happen to fall. I thought that setting the minimum and maximum of a datetime axis on the chart would have that effect.
so I have private function loadDayComplete():void{ //called when data is reloaded. also includes reassigning the dataprovider of the chart.
[Code]...
When I load up the function though it doesn't plot any points when the min and max are set. If I take out the minimum and maximum they show up fine! I double checked in debug mode that the minChartDate and maxChartDate are what they should be.. but maybe I'm misunderstanding how minimum and maximum are supposed to function... I also tried widening the min/max to include several days and still no luck. I also tried assigning the min/max when the chart data changes like so:
View 1 Replies
Jul 1, 2011
I as this working in AS2 and need to update to AS3...shows that AS3 doesn't like sloppy coding. Here's what I need: I pull data from an XML and that works when I put the data into a dynamic text box. However, I can't seem to get the date of birth into a variable. I have some code that calcs age in years but uses a string literal that I thought I could just replace with a variable from my XML...ain't a workin'. Here's the code I have:
ActionScript Code:
import flash.display.*;
import flash.text.*;
import flash.events.*;
[Code]......
View 0 Replies
Aug 18, 2010
i'm getting the xmldata from the httpservice (using cgi) and i have not set resultformat(it is coming as an object only),the xml data in this format
[Code]...
when i was tried to count the employee tag,i getting the problem, my code will like this:
[Code]...
View 1 Replies
May 11, 2005
I have a flash piece that I want to loop 3 times and then stop.
View 2 Replies
Jun 6, 2010
I have this datagrid which has columns with a NumericStepper as an itemEditor where the user can change the number of items he wants to buy. How can I calculate the sum of all cells when the user updates datagrid's values?
EDIT 1
My datagrid is about colors and sizes of a product. The columns are generated dynamically from this function
private function getColumn(dataField:String, headerText:String,editable:Boolean) : DataGridColumn
{
var column:DataGridColumn = new DataGridColumn(dataField);
[Code]....
the row.size28 is generated dynamically. So it could be row.size29,row.size30 etc.
How can I loop through all my cells without knowing their data.property?
View 1 Replies
Apr 5, 2012
I have many dropdowns in my flex application. Now I want to set rowCount property so that as many rows as possible so there is less scrolling when see the dropdown items.The flex application was running on a popup window. So I think I have to know the distance from dropdown to bottom border of window, and then calculate what number should be for the rowCount. Like Height/per row height.As I known, the dropdown.y is the relative y coordinate of itself. But my dropdown has many parent UI layout component, and also I have many dropdowns, it is hard to calculate one by one.
View 1 Replies
Jun 3, 2010
I have three datagrids inside VBox container. Since I don't want scrollbar in my flex widget i am increasing the height of SWF through javascript, which increases with each addition of row in my datagrid. My query is how can I get the exact height of my VBox which is the parent element of datagrid. I am not able to get the height of VBox. I have tried to use measuredHeight,height with no success.
View 1 Replies
Aug 11, 2010
I am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries?
View 2 Replies
Apr 8, 2011
I have this <s:list> with an itemrenderer and arraycollection as dataprovider. Now my problem is I want to be able to drag and drop to reorder those items. To do so I need to know the dragged item index, and the drop location. I have the selected item index but when I want to calculate my drop location using this code in my dragcompletehandler()...
[Code].....
View 1 Replies
Feb 21, 2012
How I can calculate packet loss from Flex.
View 1 Replies
Feb 21, 2012
How I can calculate packet loss from Flex.
View 1 Replies
Feb 23, 2012
I have two rectangles: var rect1:Rectangle = new Rectangle(66,147,89,67);
var rect2:Rectangle = new Rectangle(155,147,89,67);
How to calculate the centre point of these rectangles based on their x and y positions. I want the centre point to be calculated with relative to stage
View 2 Replies
Jul 18, 2009
In Flex 3 how to calculate start and end angle(point) of every pie chart slices?
View 1 Replies
Nov 18, 2009
I want to create a text box with a fixed width that will fit itself to its current text. So I went ahead and wrote this simple application[code]...
View 2 Replies
May 30, 2010
i'm new to AS3. how do i go about executing a custom function n number of times and then executing another function n number of times repeatedly?
eg.
function firstOne():void { }
function secondOne():void { }
i need firstOne() executed say 3 times and then secondOne() 3 times and then firstOne 3 times again and so on. i'm trying to move a movieclip 3 times to the left and then 3 times to the right continuously.
View 2 Replies
Jun 11, 2009
How can i find line number in events like mouse clicked, key down and key up. And also highlight that line with color. I used TextArea.
View 1 Replies
Jan 11, 2012
I'm getting an error after 30 seconds of execution of this service
<s:HTTPService id="svcList" url="http://localhost/index.php" method="GET" result="svcList_resultHandler(event)" fault="svcList_faultHandler(event)" requestTimeout="300">
<s:request xmlns="">
<mod>module</mod>
[Code]...
View 2 Replies
Oct 8, 2009
I ran into a problem.I'm doing a GIS program using flex. There's a map in my Application,when I click one icon on the map,windowA pops up,when I click a link inside windowA,windowB pops up,but here my problem coming out,when I close windowB and click the link inside windowA another time,Two windowB pop up...
[Code]...
View 3 Replies
Dec 3, 2009
i want to reuse an image multiple times within an item renderer, is it possible to embed the image and then reuse multiple times without having to go back to the server for the image? Is this the most performant solution?
View 1 Replies
May 1, 2010
This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code?
protected function tryLogin():void {
encryptStringResult.addEventListener('result', function(event:ResultEvent):void {
var encryptString:String = event.result.toString();
[code].....
View 1 Replies
Aug 10, 2011
The following code works in the following way:
When I enter incorrect values in the txtother.textbox and focuses out, an alert will be displayed as "Please enter a valid Format Mask." . After pressing the "ok" button in the Alertbox the txtOther.focusout even is triggered again. i.e. immediately after pressing the OK of alert, the same ALERT is displayed again.
I have added the code for ur reference:
//in mxml File:
<mx:Canvas label="General" >
<mx:VBox>
[Code].....
I don't want to the alert to come again and again .. I need it in such a way that when the ok button of alert is pressed. The txtother.text should be in focus, and the alert should not come again and again as before.
View 3 Replies
Feb 28, 2010
I created a custom validator as follows in Flex 4 beta 2[code]...
it works but if you notice I have an Alert window for testing and it gets displayed 4 times which means the validator is getting called 4 times.
View 1 Replies
Aug 24, 2010
I have a video player in flex which constantly plays a movie. Is there a way to see how many times it has played? So each time the movie is played, text filled populates with +1.
View 1 Replies
Feb 3, 2009
I have 3 swfs of a cloud animation, one for the day, one for the evening and one for the night. I would like to load the day swf from 6 am to 3 pm, evening from 4 to 6 and night well...the rest..but honestly I dont know where to start or how to make flash read the computers internal clock.
View 5 Replies
May 13, 2011
I have a list component that lists certain items..
so, if i click on a certain item..i should get the index this way : var clickedIndex:int = listID.selectedIndex; but how can i count the number of times the variable clickedIndex has been selected? so, if a user keeps clicking on the index[0], i want to know how many
View 1 Replies