Actionscript for calculations
I am attempting to develop a flash presentation which will
calculate the amount of time/money saved to our customers in using
the service we provide. I wanted some (simple?) actionscript to sum
values they enter in text boxes. Can anybody point me in the right
direction? The idea came from the mortgage shrinker here at :
http://www.oneaccount.com/
Any help would be gratefully received.
Not really anything to it. Just remember that – are you
ready for this? – number put into TEXT BOXES are considered
text (strings) by Flash.
So look up partInt() or parseFloat() in the help files to
help you change the text to numbers.
Then basically you will need to read through the help files
for the textField class to see what you can use there.
Finally remember that Flash (like any other binary based
system doing decimal math) has the occasional craziness when doing
math. So sometimes you will get and answer like 15.000000000001
when you expected 15. There are several threads around here dealing
with this. A general solution would be to use Math.round() or some
such to make sure the number is as you expect.
Similar Messages
-
How to use FORMULA in ABAP for calculation
hi all,
i have to do some calculation in my report and because of this reason i want to use formula. Could any body tell me the best way to use of formula for calculation purpose in ABAP or any other way?
Thansk,
abapfk
Moderator Message: You don't need to open a thread to know the answer for this basic question. A simple search or using ABAP Help will help in getting the answer.
Edited by: kishan P on Oct 4, 2010 11:20 AMThere is another option to do the same thing.
What can be done is, create running total. You can create running total from field explorer by right clicking and then new. Create Running Total Field dialog box appears. In that, provide the following:
i) Field to summarize - provide the field to maximize (i.e. id)
ii) Type of summary u2013 Maximum
iii) Evaluate u2013 On change of field (provide the name)
iv) Reset u2013 Never
Keep this Running total field on the details section and suppress if you do not want to show it in the details section. Place this field wherever you want in the report.
Hope this helps you. Let me know your comments. -
Code for calculating variance between plan and actual in Co module
Hi Abbapers,
I have to develop a 2 fresh report : One for calculating the variance for the Plan/Actual in controlling and second for sales variance for the month Jan to Dec .
I need your help as I have to complete this reports in this week . Its Bit urgent.
Can you please help me with the sample code or any of the similar report which you might have created as I am bit new in ABAP. Please reply asap.
Thanks in advance!
Best Regards.Hi Deepak,
For Finished Goods materials if you assigned Price control V (Moving Average) it is irrelevant to run the Standard Cost Estimation.
My earlier client we don't have variance because of the Moving Average Price for Finished Goods.
Please check, It is really required Variance?? If it is required check whether variance key is automatically assigned to Process order or not. (Control Tab)
Ravi Polampalli -
Function module for calculating planned and actual cost of production order
Hi ,
Do we have any standard function module for calculating planned and actual cost for production order?
i need to implement this in a Z-report.
Thanks
SriniHi,
try below function module
CRMCO_GET_PLAN_ACTUAL_COSTS
CO_IH_GET_PLANNED_COSTS_TOTAL
Regards,
Sankaran -
Currency Translation for Calculated Key figures
Hello Friends I want to use the Currency Translation for Calculated Key figures.
But when I go to Query and go to conversion tab it is always greyed out. Does that mean we can set the fixed conversion type for calculated key figures. like ZSAD Total debit - credit -flow value.
What is the way to do fixed currency translation in query for calculated key figures.
All the below is done now just want to specify this in query but I can'nt since it is greyed out.
All the below is done
I have created a Currency Translation Type " FiscperConversion" "ZVHGR" now this has Exchange Rate Type from Variable "ZVARN" (Which is a variable single value manual input on 0RTYPE Infoobject for exchange rate.)
2. Now Currency Tab: Target Currency is selected from Variable placed in the Report. ZRPVAR.
3. Now the Variable Time Reference is used. Standard Infoobject 0FISCPER
which is beginning of period.Hi soniya
Your calculated KF is result of some calculation ...so system will not allow u to do any translation on it...to get CT on CKF you should do it on base key figure...still if you wish to do then you can create a formula variable having processing type a customer exit...write code in cmod to rad exchange rate and multiply ur CKF by this formula variable....
Thanks
Tripple k -
Unit of measure for calculation type C must be completed
Hi All
When releasing some contracts in SRM , we are getting the error message as above.
The error message doesn't specify any particular part and the contract has more than 3000 parts.
There are no conditions at header or item level.
There is no Target quantity also. Just a Target value for the contract and prices for individual items are maintained.
We are using extended classic scenario and the contract is manually created in SRM.
I have checked the OSS notes for this error, but they are mostly for contract creation in Bidding and not for a manually created SRM contract.
We checked the UOMs for all the contract parts with the UOMs ( Base and Purchasing) in ECC Material Master and they are OK.
In our scenario , MM changes in ECC are replicated to SRM in real time
Any pointers towards pin pointing the error will be rewarded!
Regards
KedarHi,
We encountered this error message and resolved the problem by applying the following 3 SAP Notes:
a) Note #1022928 - Unit of Measure for Calculation Type C Must Be Completed
(Previously Mentioned)
b) Note #1702484 - Unit of Measure for Calculation Type C Must Be Completed
c) Note #1517648 - Default Conditions Added for Product Category Item Type
Although the contract required is similar to a "Limit" item, but had to be placed for bid, then the RFX PS Item Type was set to "Service" to receive the bid responses. After accepting the bid response, then we created a contract from the bid response. Since it was to be a "Limit" type contract, then we immediately removed the data from the following fields:
Remove the Quantity
Remove the Unit of Measure
Remove the Price
Remove the Price Condition
After removing the values from these fields, then we switched the PS Item Type from "Service" to "Product Category". We added the Guaranteed Minimum and account assignment data to encumber the funds. We were able to "Release" the contract successfully.
Bob Zinsmeister -
User Exit for calculation of inclusive tax scenario in Sales ordercreation
Hi All,
What is the User Exit for calculation of inclusive tax scenario in Sales order creation for pricing procedure.
Regards,
TulasiHi Tulasi
Please check this thread , if your problem is solved with the help of this thread then there is no need to go with the user exit.Just go with the changes in the condition types.
Tax inclusive in base price
Regards
Srinath -
Changing base for calculation of Tax
Hi All,
SAP standard delivers 0001 condition type in Tax calculation procedure as base for calculation of Tax. condition type 0001 picks up 0PR0 as base for calcualtion of tax. Can someone tell me how does system picks up 0PR0 as base for calculation of tax as i have to change the base of calculation.
Any hint would be a great help.I think I had the cart before the horse on this problem. The correct way to look at this is what is the best way to get the correct "Net Book Value" and not the correct tax depreciation posting as it never actually gets booked.
By knowing the incorrect Beginning BV, the rate depreciation is applied in year 1 and finally the desired Net BV value at the end of year 1 for tax purposes I am able to calculate the correct Unplanned Depreciation for tax to make everything work out correctly.
correct beginning tax BV $1,200
Beginning Asset Book Value $1,800
depreciation $360 (20% of BV)
Unplanned depreciation $?
Net BV for tax at end of Yr1 $960 ; or 1,200 - (1,200*.2)
With the know values above that makes my unplanned depreciation for Yr 1 to be $480. Year 1 and all following years depreciate correctly after the Unplanned Depreciation is posted.
I am marking this as resolved unless someone sees an error in my thinking.
Thanks,
Jeff -
Attributes to be used for calculation
Hi Experts,
I have a requirement for master data attribute calculation i.e. Vendor payment term's attributes like no of days. This needs to be used in a query for some calculation purpose. I wanted to know if the attributes of a master data can be used in the coulmns for calculation?
Thanks.
Points would be assignedHi Shridevi,
Thanks a lot this was very helpful and i am able to use the formula for calculation.
I just wanted a simple information. I have three key fig f1 f2 & f3 and i want a formula to check
if f1 is empty then
formula = f3-f2
else
formula = f3-f1.
Just wanted to know if this could be done in a formula or will i have to write some kind of exit?
Thanks. -
FM for calculating stock on a warehouse number
Hi all
Anybody knows a FM for calculating a material stock on a warehouse number? I need a FM which works similar to trx LS26, i need the stock sorted by storage type.
Thanks and regardsI found these FMS` ..May be it helps you or give you some guide lines..
/SAPNEA/SMAPI_STOCK_GETLIST Get stock list for warehouse and van
CBIH_LB11_QTY_GET_STOCK_TOTAL EHS: User Exit - Determine Warehouse Stock f
L2018 BAPI for Bus.Object WarehouseTransOrder
L3016 BAPI for Business Object Warehouse Stock
Thanks -
How to use data function using characterstics variable for calculation on
how to use data function using characterstics variable for calculation on attribute as key figure
Hi Gayatri
Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
This essentially means, IF A = B THEN C ELSE D
The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
IF PART_NUMBER < 'SDK00' THEN pay_amount
ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
ELSE pay_amount + 100
This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
In English this can be read as follows:
IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
Best wishes
Michael -
Need Help with ACTIONSCRIPT for Interactive Music Video
I am trying to create an interactive music video in After Effects and Flash.
The concept is that while the music video is taking place the user can decorate the hair of the woman with any of the objects they select. There will be predetermined animations and destination spots but the user can choose whatever objects they select to be delivered to the predetermined spot. I need to figure out how to let the user to select an object that will become part of the animation. I created a PDF Roughly explaining what I am trying to do. If anyone can help me I'd be very grateful as I am more versed in After Effects, I don't know ActionScript well enough to execute what I am trying to do.
Below is a rough example of what I am trying to do. There will be a music video of an animated woman singing. As she is singing the user will be able to click any of the objects , below the numbers 1-10. Below it is illustrated that the user wants to press the blue number 2. If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot. I assume I need to send a movieclip to a blank holder on the timeline and use a gotoAndPlay() action ??? I am not well versed in ActionScript so any advice would help
Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
If the user selected just 5's and 7's they would go to the predetermined preanimated paths
How would I go about writing the Actionscript for this?Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
If I say that the code for placing one MovieClip into another is:
clip1.addChild(clip2);
will it make any difference in terms of implementation?
Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start. -
Need help with actionscript for media controller
I seem to be having a slight problem. I've been looking
around and everything I see is for .flv playback. Anyways, here's
my problem.
Client wants a video that's interactive. When a transition
occurs a simple tex button shows up which links to certain web
pages. Deploying this as a .swf would be no problem, but they want
a controlbar with it so a user can scrub back and forth in the
video. So the best way to do this would be progressive or
streaming.
I created a source file that utilizes the "loader component"
and inserted the "media controller component". I'm not very good
when it comes to actionscript and can't seem to find the proper
script which utilizes the media controller so the user can scrub
back and forth. Everything else seems to work fine with the loader
as it loads an external .swf file.
Just need to get the controller working properly. Total
frames of the swf is a little over 3,000 and dividing the total
frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
online docs seem to be fragmented and not always consistant
especially when i'm not using the flvplayback or display.
Does anybody know the actionscript for this? Or where I can
find the information on this? I've associated the loader with the
controller and vice versa in the behaviors panel as well if that's
any help. Any help is much appreciated thanks.Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
If I say that the code for placing one MovieClip into another is:
clip1.addChild(clip2);
will it make any difference in terms of implementation?
Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start. -
Pricing Procedure to be configured for calculating excise
Hello ,
I have new pricing procedure to be configured for calculating excise on base value , the procedure is as under
Base Price -
X Amount
Surface transport -
Y Amount.
Crush Charges -
Z Amount.
Base for Excise Duty -
X + Y + Z
Excise Duty 10 % on base value i.e X+Y +Z
Education cess 2%
Secess 1%
Net Inclusive of Excise Amount.
Clean Energy Charges -
A
Freight Charges -
B
Other charges -
C
Net Total - ( Net charges inclusive of Excise Duty + A + B + C )
CST 2% 0n Net total.
I need to configure the above pricing procedure with Taxcode with Excise and CST .Request for valuable suggestions.
Thanks
Guru.Hi,
To configure pricing procedure we need to following Condition Technique
1. Create condition table -v/03
2. Access Sequence - v/07
3. Condtion Type v/06
4. Pricing procedurev/08 -
5. Determination of pricing procedure. ovkk
Now to create your new pricing procdure you need to create first conditon type to enter in pricing procedure
You can create new pricing procedure by copying existing one RVAA01 is the pricing procedure given by SAP & then do changes according to your requirement.
Step - enter no
counter-
Condition Type
FROM & TO - here put counter no to do calculations as per your requirement
to Make conditon manual /required/staticatl - click as per u r requirement
Print conditons
set other fields as per your requirement.
Hope this will help you.
You can also search threads for the same also for more infomation.
Thanks
Trupti -
Cannot select fields for calculating other fields~
Help -- I am tryiing to get certain fiels in a form to calculate based on selection of other fields. The fields to be selected already have values in them. (The same format I have used for several years, just new set of forms)
I get through the point of setting up the field properties to calculate and I select Sum of... Then it simply will not let me select any fields to use for calculations -- unless I select all fields.
Please -- this is time sensitive and urgent any help responses needed and welcome!Sounds like you are having issues with Acrobat and not FormsCentral. You would get a better help if you post your question on the Acrobat's forum
http://forums.adobe.com/community/acrobat/forms
Gen
Maybe you are looking for
-
Can't capture due to a lack of disk space...except the disk is empty!
Using 5.1.4, I'm attempting to capture some DV footage to an external hard drive with about 60gb free. For some reason, once FCP has captured 2 gigs worth of footage, it stops and claims there isn't enough space on the disk. My system settings show t
-
How do I add a logo to an existing skin?
Hello, I was wondering if there is a simple way to add a logo to an existing flashhelp skin. Thanks! Kelly
-
I was working on one of the most common examples of getting system date, system property etc by calling Date and System classes of java from a PHP script. I have set up apache as the webserver on RedHat linux 7.2. Compiled PHP for java and i believe
-
Hi All We are trying to implement W-4 tax with holding functionality in ESS. We are on ECC 5.0. When I try to open this application in the portal I dont get any form in the Iview except the 4 steps overview/Edit/Review and save/ Completed and a butto
-
SD card reader not working on iMac
The SD card reader slot on my iMac has stopped picking up cards. When I insert a card, it fails to mount. This used to work fine, and still does if a card is inserted while booting up. But after it has been ejected, it will fail to mount again. I've